dan select: cabinet clear stamps, no parent ura badge #62

Merged
GanYiZhong merged 1 commits from GanYiZhong/YataiDONNijiiro:fix/dan-select-marks into main 2026-10-14 06:56:02 +02:00
8 changed files with 54 additions and 1 deletions

No files matched your search

Binary file not shown.
Binary file not shown.
+4
View File
@@ -14,5 +14,9 @@
"arrow_l": { "arrow_l": {
"x": -95, "x": -95,
"y": 60 "y": 60
},
"clear_mark": {
"x": -39,
"y": 24
} }
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6 -1
View File
@@ -199,5 +199,10 @@
"exam_gauge_box": { "exam_gauge_box": {
"x": 0, "x": 0,
"y": 0 "y": 0
} },
"clear_mark": {
"x": 100,
"y": 505
},
"difficulty_ura": {}
} }
+29
View File
@@ -72,3 +72,32 @@ local function draw_cursor(self, pos, now_ms, moved_ms)
end end
if HAS_CLIPS then DanSelect.draw_cursor = draw_cursor end if HAS_CLIPS then DanSelect.draw_cursor = draw_cursor 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
-- the chara and the nameplate.
local parent_open, parent_title = DanSelect.draw_dan_open, DanSelect.draw_title
local held_stamp -- shared: the boxes and the title can be drawn through different instances
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 draw = tex.draw_texture
tex.draw_texture = function(id, p)
if id == stamp then return 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 }
end
function DanSelect:draw_title()
if parent_title then parent_title(self) end
local s = held_stamp
held_stamp = nil
if s then tex.draw_texture(s.id, { frame = s.frame, fade = s.fade }) end
end
end