AI battle: AIどん plate, section timer position, bottom-right title #20

Merged
QBaraki merged 1 commits from GanYiZhong/PyTaikoGreen:fix/ai-battle-arena-layout into main 2026-11-06 12:59:49 +01:00
4 changed files with 22 additions and 10 deletions

No files matched your search

Binary file not shown.
+10 -6
View File
@@ -354,6 +354,10 @@
"x": 50,
"y": 433
},
"ai_plate": {
"x": -64,
"y": 368
},
"scoreboard_num": [
{
"x": 112,
@@ -407,13 +411,13 @@
"y": -432
},
"progress_bar": {
"x": 147,
"y": 150
"x": 160,
"y": 154
},
"section_text": [
{
"x": 150,
"y": 150,
"x": 165,
"y": 154,
"crop": [
[0, 0, 24, 40],
[0, 40, 24, 40],
@@ -423,8 +427,8 @@
]
},
{
"x": 325,
"y": 150
"x": 339,
"y": 154
}
],
"sections": {
+4
View File
@@ -136,6 +136,10 @@
"y": 50,
"font_size": 40
},
"ai_game_song_info": {
"x": -24,
"y": 605
},
"game_song_info_subtitle": {
"y": 88,
"font_size": 22
+5 -4
View File
@@ -11,7 +11,7 @@ local SECTIONS = 5
local GAUGE_SCALE = 0.5
local GAUGE_X, GAUGE_Y = 10, 15
local PROGRESS = { x = 177, y = 160, w = 148, h = 20 }
local PROGRESS = { x = 189, y = 166, w = 150, h = 16 }
local S = tex.get_screen_scale()
local FRAME_MS = 1000 / 60
@@ -313,13 +313,13 @@ end
function AIBattleOverlay:draw_front(ms, section, section_count, progress)
local scale = tex.get_screen_scale()
local r, g, b, a = 0, 228, 48, 255
local r, g, b, a = 0, 255, 0, 255
if progress >= 0.75 then
r, g, b, a = 253, 249, 0, 255 * flash(ms, 266)
end
tex.draw_rect(PROGRESS.x * scale, PROGRESS.y * scale, PROGRESS.w * scale, PROGRESS.h * scale, 130, 130, 130, 255)
tex.draw_rect(PROGRESS.x * scale, PROGRESS.y * scale, progress * PROGRESS.w * scale, PROGRESS.h * scale, r, g, b, a)
tex.draw_texture(self:id(DIR .. "progress_bar"))
tex.draw_rect(PROGRESS.x * scale, PROGRESS.y * scale, PROGRESS.w * scale, PROGRESS.h * scale, 95, 94, 95, 255)
tex.draw_rect(PROGRESS.x * scale, PROGRESS.y * scale, progress * PROGRESS.w * scale, PROGRESS.h * scale, r, g, b, a)
if section < section_count then
tex.draw_texture(self:id(DIR .. "section_text"), { index = 0, frame = section })
@@ -892,6 +892,7 @@ function AIBattleOverlay:draw_finale(ms)
end
function AIBattleOverlay:draw_scoreboard(is_ai, good, ok, bad, drumroll)
if is_ai then tex.draw_texture(self:id(DIR .. "ai_plate")) end
tex.draw_texture(self:id(DIR .. (is_ai and "scoreboard_ai" or "scoreboard")))
local digit = self:id(DIR .. "scoreboard_num")
local margin = 8