mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
add more english
This commit is contained in:
@@ -439,9 +439,9 @@ class BoxManager:
|
||||
"""BoxManager class for the entry screen"""
|
||||
def __init__(self):
|
||||
self.box_titles: list[OutlinedText] = [
|
||||
OutlinedText('演奏ゲーム', tex.skin_config["entry_box_text"].font_size, ray.WHITE, outline_thickness=5, vertical=True),
|
||||
OutlinedText('特訓モード', tex.skin_config["entry_box_text"].font_size, ray.WHITE, outline_thickness=5, vertical=True),
|
||||
OutlinedText('ゲーム設定', tex.skin_config["entry_box_text"].font_size, ray.WHITE, outline_thickness=5, vertical=True)]
|
||||
OutlinedText(tex.skin_config["entry_game"].text[global_data.config["general"]["language"]], tex.skin_config["entry_box_text"].font_size, ray.WHITE, outline_thickness=5, vertical=True),
|
||||
OutlinedText(tex.skin_config["entry_practice"].text[global_data.config["general"]["language"]], tex.skin_config["entry_box_text"].font_size, ray.WHITE, outline_thickness=5, vertical=True),
|
||||
OutlinedText(tex.skin_config["entry_settings"].text[global_data.config["general"]["language"]], tex.skin_config["entry_box_text"].font_size, ray.WHITE, outline_thickness=5, vertical=True)]
|
||||
self.box_locations = ["SONG_SELECT", "PRACTICE_SELECT", "SETTINGS"]
|
||||
self.num_boxes = len(self.box_titles)
|
||||
self.boxes = [Box(self.box_titles[i], self.box_locations[i]) for i in range(len(self.box_titles))]
|
||||
|
||||
@@ -448,7 +448,7 @@ class Player:
|
||||
self.get_load_time(note)
|
||||
if note.type == NoteType.TAIL:
|
||||
note.load_ms = last_note.load_ms
|
||||
note.unload_ms = last_note.unload_ms
|
||||
last_note.unload_ms = note.unload_ms
|
||||
last_note = note
|
||||
|
||||
self.draw_note_list = deque(sorted(self.draw_note_list, key=lambda n: n.load_ms))
|
||||
|
||||
@@ -69,6 +69,8 @@ class SongSelectScreen(Screen):
|
||||
self.dan_transition = DanTransition()
|
||||
self.shader = ray.load_shader('shader/dummy.vs', 'shader/colortransform.fs')
|
||||
self.color = None
|
||||
song_format = tex.skin_config["song_num"].text[global_data.config["general"]["language"]]
|
||||
self.song_num = OutlinedText(song_format.format(global_data.songs_played+1), tex.skin_config["song_num"].font_size, ray.WHITE)
|
||||
self.load_shader_values(self.color)
|
||||
|
||||
session_data = global_data.session_data[global_data.player_num]
|
||||
@@ -387,8 +389,8 @@ class SongSelectScreen(Screen):
|
||||
|
||||
self.indicator.draw(tex.skin_config['song_select_indicator'].x, tex.skin_config['song_select_indicator'].y)
|
||||
|
||||
tex.draw_texture('global', 'song_num_bg', fade=0.75)
|
||||
tex.draw_texture('global', 'song_num', frame=global_data.songs_played % 4)
|
||||
tex.draw_texture('global', 'song_num_bg', fade=0.75, x=-(self.song_num.texture.width-127), x2=(self.song_num.texture.width-127))
|
||||
self.song_num.draw(ray.BLACK, x=tex.skin_config["song_num"].x-self.song_num.texture.width, y=tex.skin_config["song_num"].y)
|
||||
if self.state == State.BROWSING or self.state == State.DIFF_SORTING:
|
||||
self.timer_browsing.draw()
|
||||
elif self.state == State.SONG_SELECTED:
|
||||
|
||||
@@ -6,12 +6,14 @@ from libs.audio import audio
|
||||
from libs.global_objects import AllNetIcon, CoinOverlay, EntryOverlay
|
||||
from libs.texture import tex
|
||||
from libs.utils import (
|
||||
OutlinedText,
|
||||
get_current_ms,
|
||||
global_data,
|
||||
global_tex,
|
||||
is_l_don_pressed,
|
||||
is_r_don_pressed,
|
||||
)
|
||||
import pyray as ray
|
||||
from libs.video import VideoPlayer
|
||||
from libs.screen import Screen
|
||||
|
||||
@@ -30,9 +32,6 @@ class TitleScreen(Screen):
|
||||
base = Path(f"Skins/{global_data.config["paths"]["skin"]}/Videos")
|
||||
self.op_video_list += list((base/"op_videos").glob("**/*.mp4"))
|
||||
self.attract_video_list += list((base/"attract_videos").glob("**/*.mp4"))
|
||||
self.coin_overlay = CoinOverlay()
|
||||
self.allnet_indicator = AllNetIcon()
|
||||
self.entry_overlay = EntryOverlay()
|
||||
|
||||
def on_screen_start(self):
|
||||
super().on_screen_start()
|
||||
@@ -40,6 +39,10 @@ class TitleScreen(Screen):
|
||||
self.op_video = None
|
||||
self.attract_video = None
|
||||
self.warning_board = None
|
||||
self.coin_overlay = CoinOverlay()
|
||||
self.allnet_indicator = AllNetIcon()
|
||||
self.entry_overlay = EntryOverlay()
|
||||
self.hit_taiko_text = OutlinedText(global_tex.skin_config["hit_taiko_to_start"].text[global_data.config["general"]["language"]], tex.skin_config["hit_taiko_to_start"].font_size, ray.WHITE, spacing=5)
|
||||
self.fade_out = tex.get_animation(13)
|
||||
self.text_overlay_fade = tex.get_animation(14)
|
||||
|
||||
@@ -116,8 +119,8 @@ class TitleScreen(Screen):
|
||||
self.allnet_indicator.draw()
|
||||
self.entry_overlay.draw(tex.skin_config["entry_overlay_title"].x, y=tex.skin_config["entry_overlay_title"].y)
|
||||
|
||||
global_tex.draw_texture('overlay', 'hit_taiko_to_start', index=0, fade=self.text_overlay_fade.attribute)
|
||||
global_tex.draw_texture('overlay', 'hit_taiko_to_start', index=1, fade=self.text_overlay_fade.attribute)
|
||||
self.hit_taiko_text.draw(ray.BLACK, x=tex.screen_width*0.25 - self.hit_taiko_text.texture.width//2, y=tex.skin_config["hit_taiko_to_start"].y, fade=self.text_overlay_fade.attribute)
|
||||
self.hit_taiko_text.draw(ray.BLACK, x=tex.screen_width*0.75 - self.hit_taiko_text.texture.width//2, y=tex.skin_config["hit_taiko_to_start"].y, fade=self.text_overlay_fade.attribute)
|
||||
|
||||
class WarningScreen:
|
||||
"""Warning screen for the game"""
|
||||
|
||||
Reference in New Issue
Block a user