Compare commits

...
Author SHA1 Message Date
TaikoZhongandClaude Opus 5.5 ef06a424e4 Song select: a howto board for the tutorial folder
The tutorial folder (GENRE:TUTORIAL) uses the recent board's colours with its
own characters (box_chara frame 10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:31:14 +08:00
2 changed files with 14 additions and 1 deletions

No files matched your search

Binary file not shown.
@@ -26,6 +26,15 @@ local SORT_FOLDER_NAMES = { ["曲検索"] = true, ["Search Song"] = true, ["搜
["むずかしさからえらぶ"] = true, ["Diff Sort"] = true }
local FOLDER_FRAME_EVENT, FOLDER_FRAME_SORT, FOLDER_FRAME_DANI = 11, 12, 10
-- The tutorial folder (GENRE:TUTORIAL, genre index 0) is a howto board: the recent
-- board's colours with its own characters (box_chara frame 10).
local GENRE_TUTORIAL = 0
local FOLDER_FRAME_HOWTO, CHARA_FRAME_HOWTO = 9, 10
local function is_tutorial(box)
return box.genre_index ~= nil and box:genre_index() == GENRE_TUTORIAL
end
local SORT_COLLECTIONS = { SEARCH = true, DIFFICULTY = true }
local EVENT_COLLECTIONS = { NEW = true, RECOMMENDED = true }
@@ -39,6 +48,7 @@ local function folder_frame(box)
end
if box.kind and box:kind() == "dan" then return FOLDER_FRAME_DANI, false end
if n and SORT_FOLDER_NAMES[n] then return FOLDER_FRAME_SORT, false end
if is_tutorial(box) then return FOLDER_FRAME_HOWTO, false end
return box:genre_frame(), false
end
@@ -115,7 +125,7 @@ function SongSelect:draw_folder_board(box, pb, ch_alpha, ch_off, ta, glow_a)
-- characters: texture has L at x=510 and R at x=1410
if ch_alpha > 0 then
local slide = 450.0 - ch_off
local gframe = box:genre_frame()
local gframe = is_tutorial(box) and CHARA_FRAME_HOWTO or box:genre_frame()
tex.draw_texture(self._id_box_chara, { frame = gframe, x = bx - 960 + slide, y = by - 240, x2 = 960 - 1920, fade = fade * ch_alpha,
src = { x = 0, y = 0, width = 960, height = 480 } })
tex.draw_texture(self._id_box_chara, { frame = gframe, x = bx - slide, y = by - 240, x2 = 960 - 1920, fade = fade * ch_alpha,