Loading transition: the game hint block follows the interface language #33
No files matched your search
@@ -1,4 +1,31 @@
|
||||
{
|
||||
"transition_hint_title": {
|
||||
"font_size": 32,
|
||||
"text": {
|
||||
"ja": "ゲームのヒント",
|
||||
"en": "Hints",
|
||||
"zh": "游戏提示",
|
||||
"ko": "게임의 힌트"
|
||||
}
|
||||
},
|
||||
"transition_hint_line1": {
|
||||
"font_size": 26,
|
||||
"text": {
|
||||
"ja": "太鼓の面とフチをたたいてリズムにのろう!",
|
||||
"en": "Hit the drum face and rim and ride the rhythm!",
|
||||
"zh": "敲击鼓面和鼓边,跟上节奏吧!",
|
||||
"ko": "북면과 테두리를 두드려 리듬을 타자!"
|
||||
}
|
||||
},
|
||||
"transition_hint_line2": {
|
||||
"font_size": 26,
|
||||
"text": {
|
||||
"ja": "黄色い連打音符はたたいた数だけ得点アップ!",
|
||||
"en": "Yellow drumroll notes: every hit adds to your score!",
|
||||
"zh": "黄色连打音符敲得越多得分越高!",
|
||||
"ko": "노란 연타 음표는 두드린 만큼 점수 UP!"
|
||||
}
|
||||
},
|
||||
"screen": {
|
||||
"parent": "PyTaikoGreen",
|
||||
"width": 1920,
|
||||
|
||||
@@ -153,6 +153,16 @@ function SongTransition.new(title, subtitle, is_second)
|
||||
self.chara_l = tex.load_texture("global/rainbow_transition/chara_left")
|
||||
self.chara_r = tex.load_texture("global/rainbow_transition/chara_right")
|
||||
self.hint = tex.load_texture("global/rainbow_transition/chara_center")
|
||||
-- The hint block is baked in Japanese. Any other interface language draws the
|
||||
-- three lines as text (skin_config transition_hint_title / _line1 / _line2) at the
|
||||
-- rows measured off the texture, on the same fade.
|
||||
local lang = tex.language and tex.language() or "ja"
|
||||
if lang ~= "ja" and text and text.create_text then
|
||||
local white, black = { 255, 255, 255, 255 }, { 0, 0, 0, 255 }
|
||||
self.hint_title = text.create_text("transition_hint_title", white, black, false, 4.0, 2.0)
|
||||
self.hint_line1 = text.create_text("transition_hint_line1", white, black, false, 3.0, 2.0)
|
||||
self.hint_line2 = text.create_text("transition_hint_line2", white, black, false, 3.0, 2.0)
|
||||
end
|
||||
-- 演奏スキップON badge (the reference build loading/loading_song.nulm, mc `enso_skip_on`)
|
||||
self.skip_badge = tex.load_texture("loading/skip_badge/badge")
|
||||
-- NOT latched here: GameScreen::on_screen_start builds the transition
|
||||
@@ -276,8 +286,19 @@ function SongTransition:draw_bg(total_offset, rainbow_up, mini_up, chara_down)
|
||||
put(self.atlas_b, ORIGIN, 960 - bw * 0.5, 400 - bh * 0.5, bw, bh, info, SRC_BAND)
|
||||
-- 6. the hint block (「ゲームのヒント」 + 3 lines) on the same curve: the
|
||||
-- arcade turns every text field on at `stop` and off at `out`.
|
||||
if self.hint_title then
|
||||
-- texture rows (alpha > 200, outline included): title 165..202, line 1 228..257,
|
||||
-- line 2 282..310, all centred on x = 960; the texture sits at y = 568.
|
||||
local function centred(t, y)
|
||||
if t then t:draw({ x = math.floor(960 - t.width / 2 + 0.5), y = y, fade = info }) end
|
||||
end
|
||||
centred(self.hint_title, 568 + 165)
|
||||
centred(self.hint_line1, 568 + 228)
|
||||
centred(self.hint_line2, 568 + 282)
|
||||
else
|
||||
put(self.hint, REST_HINT, 0, 568, 1920, 512, info)
|
||||
end
|
||||
end
|
||||
|
||||
-- 7. 演奏スキップON badge, top-left, on the same fade as the band. The arcade
|
||||
-- shows it ONLY on the song-loading screens (loading/loading_song,
|
||||
|
||||
Reference in new issue
Block a user