Compare commits

...
Author SHA1 Message Date
TaikoZhongandClaude Opus 5.5 a029b25b22 dan select: back chip, chip names, cursor and course rows (#53)
- Back entry: a chip in the top strip (back/folder, a light blue in the parent's back
  colour) with its label from skin_config dan_back_label, so it follows the language
  (ja 戻る, en Back, zh 返回, ko 뒤로).
- Chip names are black with no outline: dan_chip_name_black moves into screen.options,
  where the engine reads it.
- The selected chip drops below the strip and eases back; the cursor glow covers the
  chip and its name but not the clear stamp.
- Course rows: the 1st/2nd/3rd labels are centred on their row, and the level is one
  "star + number" image per level (yellow_box/difficulty_level, 1..10 and 10+) in place of
  the separate star and digits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:12:37 +08:00
TaikoZhongandClaude Opus 5.5 6b5ae8b5b5 Update checksums.sha256 for #62
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:56:25 +08:00
GanYiZhong afe0bab807 Merge pull request 'dan select: cabinet clear stamps, no parent ura badge' (#62) from GanYiZhong/YataiDONNijiiro:fix/dan-select-marks into main 2026-10-14 06:56:00 +02:00
17 changed files with 239 additions and 12 deletions

No files matched your search

Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
{
"folder": {
"x": -44,
"y": 16
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6 -2
View File
@@ -190,7 +190,7 @@
},
"song_label": {
"x": 430,
"y": 230
"y": 246
},
"exam_seg_label": {
"x": 0,
@@ -204,5 +204,9 @@
"x": 100,
"y": 505
},
"difficulty_ura": {}
"difficulty_ura": {},
"difficulty_level": {
"x": 538,
"y": 287
}
}
+14
View File
@@ -45,6 +45,7 @@
"combo_color_tiers": true,
"gauge_cell_fade_in": true,
"dan_exam_grid": true,
"dan_chip_name_black": true,
"disable_chara_3d": false
}
},
@@ -833,6 +834,19 @@
"height": 88,
"font_size": 42
},
"dan_back_label": {
"x": 0,
"y": 89,
"width": 60,
"height": 88,
"font_size": 42,
"text": {
"en": "Back",
"ja": "戻る",
"zh": "返回",
"ko": "뒤로"
}
},
"dan_result_chara": {
"x": 187,
"y": 934
+169 -7
View File
@@ -47,12 +47,14 @@ function DanSelect.new()
end
-- pos: selected chip x (the textures' own json positions carry the rest);
-- now_ms: engine clock; moved_ms: ms since the last ribbon step (-1 = never).
local function draw_cursor(self, pos, now_ms, moved_ms)
-- now_ms: engine clock; moved_ms: ms since the last ribbon step (-1 = never);
-- y: how far the selected chip has dropped (see draw_box below).
local function draw_cursor(self, pos, now_ms, moved_ms, y)
y = y or 0
if self.t_cursor then
local f = (now_ms * 0.06) % 60
local a = CUR:get("#259@0", f, "a") or 1
tex.draw_texture(self.t_cursor, { x = pos, fade = a })
tex.draw_texture(self.t_cursor, { x = pos, y = y, fade = a })
end
if moved_ms and moved_ms >= 0 then
local f = moved_ms * 0.06
@@ -61,10 +63,10 @@ local function draw_cursor(self, pos, now_ms, moved_ms)
local a = ARW:get("#261@0", f, "a") or 0
if a > 0 then
if self.t_arrow_r then
tex.draw_texture(self.t_arrow_r, { x = pos + drift, fade = a })
tex.draw_texture(self.t_arrow_r, { x = pos + drift, y = y, fade = a })
end
if self.t_arrow_l then
tex.draw_texture(self.t_arrow_l, { x = pos - drift, fade = a })
tex.draw_texture(self.t_arrow_l, { x = pos - drift, y = y, fade = a })
end
end
end
@@ -73,6 +75,15 @@ end
if HAS_CLIPS then DanSelect.draw_cursor = draw_cursor end
-- The level is the cabinet's own art, one "star + number" image per level
-- (yellow_box/difficulty_level, frames 1..10 and 10+), in place of the parent's star and
-- level digits, which are held back.
local function draw_level(level, x, y, f)
local id = tex.get_texture("dan_select/yellow_box/difficulty_level")
if not id or level < 1 then return end
tex.draw_texture(id, { frame = math.min(level, 11) - 1, x = x, y = y, fade = f })
end
-- The course's clear stamp (yellow_box/clear_mark) sits over the dan plate and Don, as the
-- cabinet's stamp_detail does (it is above don_1p). The parent draws it with the box, under
-- both, so it is held back there and drawn with the title, which the engine draws after
@@ -82,16 +93,35 @@ local held_stamp -- shared: the boxes and the title can be drawn through diffe
if parent_open then
function DanSelect:draw_dan_open(box)
local stamp = tex.get_texture("dan_select/yellow_box/clear_mark")
if not stamp or box.clear_mark <= 0 then return parent_open(self, box) end
local level = tex.get_texture("dan_select/yellow_box/difficulty_level")
local hide = {}
if level then
for _, n in ipairs({ "difficulty_star", "difficulty_num", "difficulty_x" }) do
local t = tex.get_texture("dan_select/yellow_box/" .. n)
if t then hide[#hide + 1] = t end
end
end
local draw = tex.draw_texture
tex.draw_texture = function(id, p)
if id == stamp then return end
for _, t in ipairs(hide) do -- handles compare with ==, not as table keys
if id == t then return end
end
return draw(id, p)
end
local ok, err = pcall(parent_open, self, box)
tex.draw_texture = draw
if not ok then error(err, 0) end
held_stamp = { id = stamp, frame = box.clear_mark - 1, fade = box.open_fade.attribute }
local f = box.open_fade.attribute
local off = tex.get_skin_config("dan_yellow_box_offset") or { x = 0, y = 0 }
if level then
for i = 0, box:song_count() - 1 do
draw_level(box:song_level(i), i * (off.x or 0), i * (off.y or 0), f)
end
end
if stamp and box.clear_mark > 0 then
held_stamp = { id = stamp, frame = box.clear_mark - 1, fade = f }
end
end
function DanSelect:draw_title()
@@ -101,3 +131,135 @@ if parent_open then
if s then tex.draw_texture(s.id, { frame = s.frame, fade = s.fade }) end
end
end
-- The back entry is one more chip in the top strip (back/folder, laid out like box/folder);
-- the parent's opening board is its own layout, so nothing opens under it here.
-- Its label comes from skin_config dan_back_label, so it follows the language setting. It is set
-- like the dan chip names (black, no outline: dan_chip_name_black), vertical for CJK and
-- across, squeezed to the chip, for other languages.
local CJK = { ja = true, zh = true, ko = true, tw = true, cn = true }
local back_label
local function get_back_label()
if back_label == nil then
local cfg = tex.get_skin_config("dan_back_label")
if not cfg then back_label = false; return false end
local lang = tex.language()
local vertical = CJK[lang] or CJK[lang:sub(1, 2)] or false
back_label = {
cfg = cfg,
vertical = vertical,
main = text.create_raw_text(tex.skin_text("dan_back_label"), cfg.font_size,
{ 0, 0, 0, 255 }, { 0, 0, 0, 255 }, vertical, 0, 2),
}
end
return back_label
end
local function draw_back_label(bx, fade, y)
local label = get_back_label()
if not label then return end
local cfg, main = label.cfg, label.main
local sx, sy = 1, 1
if label.vertical then
sy = math.min(1, cfg.height / main.height)
else
sx = math.min(1, cfg.width / main.width) -- width: chip face less the border
end
local w, h = main.width * sx, main.height * sy
main:draw({ x = bx + cfg.x - w / 2, y = cfg.y + (cfg.height - h) / 2 + y,
x2 = w - main.width, y2 = h - main.height, fade = fade })
end
-- The selected chip drops below the strip, as the cabinet's does, easing there and back.
-- Only draw_cursor (called after every box) is told where the cursor is, so the boxes are
-- held back in draw_box and drawn from draw_cursor.
local SELECTED_DROP = 22
local DROP_MS = 60 -- time constant of the ease
local drop = {} -- chip key -> current drop
local held_boxes = {}
local last_ms
local function chip_key(box)
return box.is_back and "\0back" or box.text_name
end
local function chip_drop(box)
return drop[chip_key(box)] or 0
end
local function draw_chip_name(box, bx, y, fade)
local name = box:chip_name()
if not name then return end
local nb = tex.get_skin_config("dan_chip_name") or { x = 0, y = 0 }
name:draw({
x = bx + nb.x - name.width / 2,
y = nb.y + y,
y2 = math.min(name.height, nb.height or name.height) - name.height,
fade = fade,
})
end
-- the chip as the parent draws it (folder, stamp, name), at its drop
function DanSelect:draw_dan_closed(box)
local bx, fade, y = box:box_x(), box.fade.attribute, chip_drop(box)
local id = tex.get_texture("dan_select/box/folder")
if id then tex.draw_texture(id, { frame = box.dan_color, x = bx, y = y, fade = fade }) end
local mark = box.clear_mark > 0 and tex.get_texture("dan_select/box/clear_mark")
if mark then tex.draw_texture(mark, { frame = box.clear_mark - 1, x = bx, y = y, fade = fade }) end
draw_chip_name(box, bx, y, fade)
end
function DanSelect:draw_back_box(box)
local bx, fade, y = box:box_x(), box.fade.attribute, chip_drop(box)
local id = tex.get_texture("dan_select/back/folder")
if id then tex.draw_texture(id, { x = bx, y = y, fade = fade }) end
draw_back_label(bx, fade, y)
end
-- The cursor's glow goes over the chip, its emblem and name (they grey under it, as on the
-- cabinet) but not over the clear stamp, which is drawn again on top of it.
local function draw_chip_front(box)
if box.is_back or box.clear_mark <= 0 then return end
local mark = tex.get_texture("dan_select/box/clear_mark")
if mark then
tex.draw_texture(mark, { frame = box.clear_mark - 1, x = box:box_x(), y = chip_drop(box),
fade = box.fade.attribute })
end
end
local parent_draw_box = DanSelect.draw_box
function DanSelect:draw_box(box)
held_boxes[#held_boxes + 1] = box
end
local cursor_parent = DanSelect.draw_cursor
function DanSelect:draw_cursor(pos, now_ms, moved_ms)
local boxes = held_boxes
held_boxes = {}
local k = last_ms and math.min(1, math.max(0, now_ms - last_ms) / DROP_MS) or 1
last_ms = now_ms
local selected
for _, box in ipairs(boxes) do
local key = chip_key(box)
local is_sel = math.abs(box:box_x() - pos) < 1
if is_sel then selected = box end
local d = drop[key] or 0
d = d + ((is_sel and SELECTED_DROP or 0) - d) * k
drop[key] = (math.abs(d) >= 0.05) and d or nil
end
-- draw every box even if one fails, then report the first failure
local err
for _, box in ipairs(boxes) do
local ok, e = pcall(parent_draw_box, self, box)
if not ok and not err then err = e end
end
if err then error(err, 0) end
local y = selected and chip_drop(selected) or 0
if cursor_parent then
cursor_parent(self, pos, now_ms, moved_ms, y)
elseif self.t_cursor then
tex.draw_texture(self.t_cursor, { x = pos, y = y })
end
if selected then draw_chip_front(selected) end
return true
end
+8 -3
View File
@@ -3339,7 +3339,7 @@ cd1f1abd28f620daa82c754e534ae5db109bf5396a3b9cefc17269ecc311cc67 *./Graphics/dan
47b54ec0b0ccccb7003d3e6a9247f1561c368446c56d355fb16831576919de0c *./Graphics/dan_select/box/folder/4.png
b8ab754cf2572c19503ab87c5bf24ec1a9b04e1979a6dda1204754bde76ca334 *./Graphics/dan_select/box/folder/5.png
6618676b7cd9b10d34ea5c77db694b7a9bfa20e00c1adc3f1360d7b58395f830 *./Graphics/dan_select/box/folder/6.png
1d4c046f5b002483fea0141996fde37460ea982d6cd54a9b361bd184205f934f *./Graphics/dan_select/box/texture.json
2ffbd8736449b0abf258f3b90772fdabc10945cc3d23259a23a77feac86264aa *./Graphics/dan_select/box/texture.json
a96f4865380131db7f110a085dc2b96ce9cbcb56167c8297edb0df1a468c3552 *./Graphics/dan_select/confirm_box/bg.png
5760a3508a5f41e9778601a1f4d4ed8b7bc26000dc75b96383f3e2088c67b2a9 *./Graphics/dan_select/confirm_box/confirmation_text.png
b5fba1d4f955a7254a2d3b3662336cb0ac19c7ed395062edc5936d218a870c29 *./Graphics/dan_select/confirm_box/no.png
@@ -3457,7 +3457,7 @@ aae5cba4ab39d7b29c44bb43c79ae59c6ed7ddd151c8840bfeaf2bb4d6278c3d *./Graphics/dan
ac0e5f9f354f6059ea7687a706221ff863d317f6783f854897f023a5315e8d56 *./Graphics/dan_select/yellow_box/song_label/0.png
340ea6974d9c74280d7532d6eb66b7eab2fd2634071325f4ba4654edb89d9e8e *./Graphics/dan_select/yellow_box/song_label/1.png
5839347db9c87f848fe112052938d42de85d10448df52626d27d3b39147c9bdd *./Graphics/dan_select/yellow_box/song_label/2.png
cb43d113c38c040566f05245c7259592599647754231d16de591850a0d2627eb *./Graphics/dan_select/yellow_box/texture.json
a7d8044152e09d0de4d45e28f52be114f5270ad77c0eb561e5d7524d3cd42fde *./Graphics/dan_select/yellow_box/texture.json
52b3b7c93ee491e74e3e4a627f77dd1b1689a58be3f0d814bf1fafc5cb101ec1 *./Graphics/dan_select/yellow_box/total_notes_bg.png
ded547deee71bf781f90e2d9c29ab2c0a8f3dbf1ec5f745a345859ebf7810184 *./Graphics/dan_select/yellow_box/total_notes_counter/0.png
caea6b27ce43889309a7d27150b37914ef64725dbd0765eab2c996839699b8d3 *./Graphics/dan_select/yellow_box/total_notes_counter/1.png
@@ -5005,7 +5005,7 @@ f204455c907d3e0e7affb89db3649a709a27d528d84cc58d51a7d8cfaa1d3deb *./Scripts/back
4e17bf53815d1e586fdba5f3501d6f2d9935ad5604da871d2e7e89c87499aedd *./Scripts/background/dancer_data/dancer_3.lua
6e2b3c136611c688cdfbe44b0bbcb9d25c2ab647903246b07f2aef9baa6bab0b *./Scripts/background/dancer_data/dancer_4.lua
3a4f1f45bb54c4303dc97afcc6f67df831d6d6011a2264baed3d933c789d210e *./Scripts/background/dancer_data/dancer_5.lua
e8f58cd79a9a2fea5730eb30ecf69a1e3dedf654840a4ffa9428e8418d34f777 *./Scripts/dan_select/dan_select.lua
0cf21c1fa200028935b148a71dd5a97942e9b73f5f957d358951ebbf60801ee0 *./Scripts/dan_select/dan_select.lua
020f929896e3f58c27bf54881afbbf1597ebd14951b5476f9a97a29fa670e2fc *./Scripts/entry/box.lua
0a941cea73b6a81f2c92219be139a43f5902067ce468ffd189520395b4739c91 *./Scripts/entry/costume_menu.lua
83fc6c160c85a68a75d146f455cb4e18fc962c23a0020d28ac6943a1843db504 *./Scripts/entry/entry.lua
@@ -5335,3 +5335,8 @@ c567acc69bf6e9a239e66a195f2d65a7ec6455acff3ee248f4302477d01c193d *./Videos/attra
3ae7d8f807a3bd693fd4a380e6f6ebedae4d443d796049880f69bc23456a9f85 *./Videos/attract_videos/attractdemo_en_us.mp4
54f561d89b48feff2fa31999e7485e370f2c55b9f360102b2014310078d20fc3 *./Videos/attract_videos/attractdemo_kor.mp4
3801f84ff85f56376828abef0b12bd8a1e336b4bc739557bc0ccfa386d79668e *./Videos/op_videos/title.mp4
108925ad487038a40cb711be11c751b31205a2e9527e97f2dec4410503fe5cb6 *./Graphics/dan_select/box/clear_mark/0.png
8ce42b15149894471e7644a836613106a9302004211a084b6144ef66d11be07f *./Graphics/dan_select/box/clear_mark/1.png
433af3c4eef82636a70592e1bebaa44d9b8f88da5abe240fe55e06535d659110 *./Graphics/dan_select/yellow_box/clear_mark/0.png
15c702977afc97112aff1d435e87040ea3262ecd66fcfb9ca4dfa769311b23ff *./Graphics/dan_select/yellow_box/clear_mark/1.png
c2153f77e11087fcb078ae38527fa83bef29791e3700e30cc87fec4405a66d0f *./Graphics/dan_select/yellow_box/difficulty_ura.png