mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
add nameplates
This commit is contained in:
@@ -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 != []:
|
||||
|
||||
Reference in New Issue
Block a user