add nameplates

This commit is contained in:
Yonokid
2025-08-29 11:00:02 -04:00
parent 1dd4e166b7
commit 4bc537bf6d
10 changed files with 78 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ import pyray as ray
from libs.animation import Animation, MoveAnimation
from libs.audio import audio
from libs.global_objects import Nameplate
from libs.texture import tex
from libs.tja import TJAParser, test_encodings
from libs.transition import Transition
@@ -80,6 +81,8 @@ class SongSelectScreen:
self.is_ura = False
self.screen_init = True
self.ura_switch_animation = UraSwitchAnimation()
plate_info = global_data.config['nameplate']
self.nameplate = self.nameplate = Nameplate(plate_info['name'], plate_info['title'], global_data.player_num, plate_info['dan'], plate_info['gold'])
if self.navigator.items == []:
return self.on_screen_end("ENTRY")
@@ -101,6 +104,7 @@ class SongSelectScreen:
self.navigator.reset_items()
audio.unload_all_sounds()
tex.unload_textures()
self.nameplate.unload()
return next_screen
def reset_demo_music(self):
@@ -355,6 +359,7 @@ class SongSelectScreen:
self.ura_switch_animation.update(get_current_ms())
self.diff_selector_move_1.update(get_current_ms())
self.diff_selector_move_2.update(get_current_ms())
self.nameplate.update(get_current_ms())
if self.text_fade_out.is_finished:
self.selected_song = True
@@ -461,6 +466,11 @@ class SongSelectScreen:
tex.draw_texture('global', 'footer')
if self.nameplate.player_num == 1:
self.nameplate.draw(30, 640)
else:
self.nameplate.draw(950, 640)
self.ura_switch_animation.draw()
if self.state == State.BROWSING and self.navigator.items != []: