diff --git a/Graphics/dan_select/yellow_box/exam_gauge_best_pill.png b/Graphics/dan_select/yellow_box/exam_gauge_best_pill.png new file mode 100644 index 0000000..a0948aa --- /dev/null +++ b/Graphics/dan_select/yellow_box/exam_gauge_best_pill.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cafca767d283873211e2050e760c1bd135bc17d1fab8a4ec4312f602d222f3b3 +size 663 diff --git a/Graphics/dan_select/yellow_box/exam_gauge_box.png b/Graphics/dan_select/yellow_box/exam_gauge_box.png index 93b8298..8f4e09f 100644 --- a/Graphics/dan_select/yellow_box/exam_gauge_box.png +++ b/Graphics/dan_select/yellow_box/exam_gauge_box.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a754e1f57dbd22ba06ea57ccc84d326bc866a801e6922d28638d75dc6c005245 -size 7354 +oid sha256:c84900caf5c24158b217d2a071b3056d625d8508afc7c736ec36eb373a091a97 +size 6913 diff --git a/Graphics/dan_select/yellow_box/texture.json b/Graphics/dan_select/yellow_box/texture.json index 3f1f047..00a12bc 100644 --- a/Graphics/dan_select/yellow_box/texture.json +++ b/Graphics/dan_select/yellow_box/texture.json @@ -209,5 +209,6 @@ "x": 538, "y": 287 }, - "exam_best_pill": {} + "exam_best_pill": {}, + "exam_gauge_best_pill": {} } diff --git a/Scripts/dan_select/dan_select.lua b/Scripts/dan_select/dan_select.lua index 4d2d01a..5c39c53 100644 --- a/Scripts/dan_select/dan_select.lua +++ b/Scripts/dan_select/dan_select.lua @@ -410,11 +410,12 @@ function DanSelect:draw_cursor(pos, now_ms, moved_ms) end -- Each exam's 自己ベスト row, as on the cabinet: a white pill under the value with the label --- on its left and the saved best on its right (box:exam_best / exam_song_best; an engine --- without them, or a course never played, shows the label alone). The gauge box's pill is --- part of exam_gauge_box; the right-hand boxes get yellow_box/exam_best_pill, one per song --- segment. The boxes are walked as the parent's draw_exam_grid walks them. -local BEST_GAUGE = { x = 10, y = 116, w = 301 } -- the pill in exam_gauge_box, from the box +-- on its left and the saved best on its right (box:exam_best / exam_song_best). With no best +-- (a course never played, or an engine without them) the row is not drawn at all, pill +-- included. The gauge box gets yellow_box/exam_gauge_best_pill, the right-hand boxes +-- yellow_box/exam_best_pill, one per song segment. The boxes are walked as the parent's +-- draw_exam_grid walks them. +local BEST_GAUGE = { x = 10, y = 116, w = 301 } -- exam_gauge_best_pill, from the box local BEST_RIGHT = { x = 11, y = 86, w = 317 } -- exam_best_pill, from the box (+ seg dx) local BEST_H = 31 local BEST_LABEL_X, BEST_VALUE_R = 8, 14 -- label from the pill's left, value from its right @@ -438,17 +439,17 @@ local function call(box, name, ...) return ok2 and v or nil end -local function draw_best_row(box, value, etype, px, py, pw, f) +local function draw_best_row(pill, value, etype, px, py, pw, f) + if value == nil then return end + if pill then tex.draw_texture(pill, { x = px, y = py, fade = f }) end local label = best_text("dan_exam_best_label", tex.skin_text("dan_exam_best_label")) if label then label:draw({ x = px + BEST_LABEL_X, y = py + (BEST_H - label.height) / 2, fade = f }) end - if value then - local str = tostring(value) .. (etype == "gauge" and " %" or "") - local t = best_text("dan_exam_best_value", str) - if t then - t:draw({ x = px + pw - BEST_VALUE_R - t.width, y = py + (BEST_H - t.height) / 2, fade = f }) - end + local str = tostring(value) .. (etype == "gauge" and " %" or "") + local t = best_text("dan_exam_best_value", str) + if t then + t:draw({ x = px + pw - BEST_VALUE_R - t.width, y = py + (BEST_H - t.height) / 2, fade = f }) end end @@ -457,6 +458,7 @@ if parent_grid then function DanSelect:draw_exam_grid(box, f) parent_grid(self, box, f) local pill = tex.get_texture("dan_select/yellow_box/exam_best_pill") + local gauge_pill = tex.get_texture("dan_select/yellow_box/exam_gauge_best_pill") local gb = tex.get_skin_config("dan_exam_gauge_box") or { x = 436, y = 610 } local sb = tex.get_skin_config("dan_exam_score_box") or { x = 769, y = 610, height = 132 } local sg = tex.get_skin_config("dan_exam_seg") or { width = 327 } @@ -468,7 +470,7 @@ if parent_grid then local left = (etype == "gauge" and not gauge_used) if left then gauge_used = true end if left then - draw_best_row(box, call(box, "exam_best", i), etype, + draw_best_row(gauge_pill, call(box, "exam_best", i), etype, gb.x + BEST_GAUGE.x, gb.y + BEST_GAUGE.y, BEST_GAUGE.w, f) elseif right_row < 3 then local by = sb.y + pitch * right_row @@ -477,9 +479,8 @@ if parent_grid then for k = 0, segs - 1 do local px = sb.x + BEST_RIGHT.x + seg_dx * k local py = by + BEST_RIGHT.y - if pill then tex.draw_texture(pill, { x = px, y = py, fade = f }) end local v = gothrough and call(box, "exam_best", i) or call(box, "exam_song_best", i, k) - draw_best_row(box, v, etype, px, py, BEST_RIGHT.w, f) + draw_best_row(pill, v, etype, px, py, BEST_RIGHT.w, f) end right_row = right_row + 1 end