mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
display mods on result screen
This commit is contained in:
@@ -82,7 +82,7 @@ def main():
|
||||
if global_data.config["video"]["fullscreen"]:
|
||||
ray.toggle_fullscreen()
|
||||
|
||||
current_screen = Screens.LOADING
|
||||
current_screen = Screens.RESULT
|
||||
|
||||
audio.init_audio_device()
|
||||
|
||||
|
||||
@@ -126,17 +126,20 @@ class TextureWrapper:
|
||||
self.load_zip(screen_name, zip.name)
|
||||
|
||||
def control(self, tex_object: Texture):
|
||||
distance = 1
|
||||
if ray.is_key_down(ray.KeyboardKey.KEY_LEFT_SHIFT):
|
||||
distance = 10
|
||||
if ray.is_key_pressed(ray.KeyboardKey.KEY_LEFT):
|
||||
tex_object.x -= 1
|
||||
tex_object.x -= distance
|
||||
print(f"{tex_object.name}: {tex_object.x}, {tex_object.y}")
|
||||
if ray.is_key_pressed(ray.KeyboardKey.KEY_RIGHT):
|
||||
tex_object.x += 1
|
||||
tex_object.x += distance
|
||||
print(f"{tex_object.name}: {tex_object.x}, {tex_object.y}")
|
||||
if ray.is_key_pressed(ray.KeyboardKey.KEY_UP):
|
||||
tex_object.y -= 1
|
||||
tex_object.y -= distance
|
||||
print(f"{tex_object.name}: {tex_object.x}, {tex_object.y}")
|
||||
if ray.is_key_pressed(ray.KeyboardKey.KEY_DOWN):
|
||||
tex_object.y += 1
|
||||
tex_object.y += distance
|
||||
print(f"{tex_object.name}: {tex_object.x}, {tex_object.y}")
|
||||
|
||||
def draw_texture(self, subset: str, texture: str, color: ray.Color=ray.WHITE, frame: int = 0, scale: float = 1.0, center: bool = False,
|
||||
|
||||
@@ -196,6 +196,22 @@ class ResultScreen:
|
||||
ray.end_shader_mode()
|
||||
self.bottom_characters.draw()
|
||||
|
||||
def draw_modifiers(self):
|
||||
if global_data.modifiers.display:
|
||||
tex.draw_texture('score', 'mod_doron')
|
||||
if global_data.modifiers.inverse:
|
||||
tex.draw_texture('score', 'mod_abekobe')
|
||||
if global_data.modifiers.random == 1:
|
||||
tex.draw_texture('score', 'mod_kimagure')
|
||||
elif global_data.modifiers.random == 2:
|
||||
tex.draw_texture('score', 'mod_detarame')
|
||||
if global_data.modifiers.speed >= 4:
|
||||
tex.draw_texture('score', 'mod_yonbai')
|
||||
elif global_data.modifiers.speed >= 3:
|
||||
tex.draw_texture('score', 'mod_sanbai')
|
||||
elif global_data.modifiers.speed > 1:
|
||||
tex.draw_texture('score', 'mod_baisaku')
|
||||
|
||||
def draw(self):
|
||||
x = 0
|
||||
while x < self.width:
|
||||
@@ -230,6 +246,8 @@ class ResultScreen:
|
||||
if self.crown is not None:
|
||||
self.crown.draw(self.crown_type)
|
||||
|
||||
self.draw_modifiers()
|
||||
|
||||
if self.high_score_indicator is not None:
|
||||
self.high_score_indicator.draw()
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ class SongSelectScreen:
|
||||
return self.on_screen_end('ENTRY')
|
||||
|
||||
def draw_selector(self):
|
||||
fade = 0.5 if self.neiro_selector is not None else self.text_fade_in.attribute
|
||||
fade = 0.5 if (self.neiro_selector is not None or self.modifier_selector is not None) else self.text_fade_in.attribute
|
||||
direction = 1 if self.diff_select_move_right else -1
|
||||
if self.selected_difficulty <= -1 or self.prev_diff == -1:
|
||||
if self.prev_diff == -1 and self.selected_difficulty >= 0:
|
||||
|
||||
Reference in New Issue
Block a user