From 4560b5a4b137989860274e89387db8f1ed768f10 Mon Sep 17 00:00:00 2001 From: TaikoZhong <108016253+GanYiZhong@users.noreply.github.com> Date: Mon, 2 Nov 2026 14:53:04 +0800 Subject: [PATCH 1/3] Nameplate: keep the name clear of the dan chip The name was centred right of half the badge plus the chip's width, but the chip is drawn at its texture.json x: without a badge (the entry screen) the name started at x 64 while the chip ends at x 126, so a name ran over the dan text. The name is now centred right of the chip's actual right edge (or the badge when there is no dan). Co-Authored-By: Claude Opus 5.5 --- Scripts/global/nameplate.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Scripts/global/nameplate.lua b/Scripts/global/nameplate.lua index 3ddde3b4..e14fa8fe 100644 --- a/Scripts/global/nameplate.lua +++ b/Scripts/global/nameplate.lua @@ -187,9 +187,13 @@ function Nameplate:draw(x, y, fade) local frame_top_h = self.frame_top_info.height local outline_h = self.outline_info.height - local name_max = frame_top_w - self.padding - offset - dan_offset + -- the name is centred right of the badge, or right of the dan chip (drawn at its texture.json x, + -- so where it ends doesn't depend on the badge) + local left = offset + if dan_offset > 0 then left = math.max(offset, self.emblem_info.x[1] + dan_offset) end + local name_max = frame_top_w - self.padding - left local name_width = math.min(self.name_text.width, name_max) - local name_x = x + offset + dan_offset + (outline_w - offset - dan_offset) / 2.0 - name_width / 2 + local name_x = x + left + (outline_w - left) / 2.0 - name_width / 2 local name_y = y + outline_h / 2.0 + self.name_offset self.name_text:draw({ x = name_x, y = name_y, x2 = name_width - self.name_text.width, fade = fade }) -- 2.54.0 From 8ceb2df868df6fe90d82706ca35c1047190005c9 Mon Sep 17 00:00:00 2001 From: TaikoZhong <108016253+GanYiZhong@users.noreply.github.com> Date: Mon, 2 Nov 2026 14:55:51 +0800 Subject: [PATCH 2/3] Nameplate: without a badge, the dan chip's black reaches the plate's left end The chip curves in around the player badge; on a plate without one that left a light crescent at the left end. dan_emblem_bg_left fills it. Co-Authored-By: Claude Opus 5.5 --- Graphics/global/nameplate/dan_emblem_bg_left.png | 3 +++ Graphics/global/nameplate/texture.json | 4 ++++ Scripts/global/nameplate.lua | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 Graphics/global/nameplate/dan_emblem_bg_left.png diff --git a/Graphics/global/nameplate/dan_emblem_bg_left.png b/Graphics/global/nameplate/dan_emblem_bg_left.png new file mode 100644 index 00000000..f58e5de0 --- /dev/null +++ b/Graphics/global/nameplate/dan_emblem_bg_left.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9aec8f79e0d4024684f4c5c046ecc4953a1b1cb1257701b3486100b9b85434b3 +size 176 diff --git a/Graphics/global/nameplate/texture.json b/Graphics/global/nameplate/texture.json index 1d63993b..3e280834 100644 --- a/Graphics/global/nameplate/texture.json +++ b/Graphics/global/nameplate/texture.json @@ -8,6 +8,10 @@ "x": 11.5, "y": 27 }, + "dan_emblem_bg_left": { + "x": 5, + "y": 30 + }, "frame_top": { "crop": [ [0, 0, 272, 32], diff --git a/Scripts/global/nameplate.lua b/Scripts/global/nameplate.lua index e14fa8fe..e1c03bcd 100644 --- a/Scripts/global/nameplate.lua +++ b/Scripts/global/nameplate.lua @@ -47,6 +47,7 @@ function Nameplate.new(name, title, player_num, dan, is_gold, is_rainbow, title_ self.frame_top = tex.get_texture("global/nameplate/frame_top") self.frame_top_rainbow = tex.get_texture("global/nameplate/frame_top_rainbow") self.dan_emblem_bg = tex.get_texture("global/nameplate/dan_emblem_bg") + self.dan_emblem_bg_left = tex.get_texture("global/nameplate/dan_emblem_bg_left") self.dan_emblem = tex.get_texture("global/nameplate/dan_emblem") self.dan_emblem_gold = tex.get_texture("global/nameplate/dan_emblem_gold") self.shimmer = tex.get_texture("global/nameplate/shimmer") @@ -167,6 +168,10 @@ function Nameplate:draw(x, y, fade) local dan_offset = 0 if self.dan ~= -1 then + -- the chip curves in around the badge; without one, fill the plate out to its left end + if not self.pnum_tex and self.dan_emblem_bg_left then + tex.draw_texture(self.dan_emblem_bg_left, { x = x, y = y, fade = fade }) + end tex.draw_texture(self.dan_emblem_bg, { x = x, y = y, fade = fade }) if self.is_gold then tex.draw_texture(self.dan_emblem_gold, { frame = self.dan, x = x, y = y, fade = fade }) -- 2.54.0 From 6fdaf558dea24864c14182174681769b1e479907 Mon Sep 17 00:00:00 2001 From: TaikoZhong <108016253+GanYiZhong@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:01:30 +0800 Subject: [PATCH 3/3] Nameplate: no dan on a plate without a player badge The entry screen's plate shows only the title and the name, centred. This replaces the left-end fill from the previous commit. Co-Authored-By: Claude Opus 5.5 --- Graphics/global/nameplate/dan_emblem_bg_left.png | 3 --- Graphics/global/nameplate/texture.json | 4 ---- Scripts/global/nameplate.lua | 8 ++------ 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 Graphics/global/nameplate/dan_emblem_bg_left.png diff --git a/Graphics/global/nameplate/dan_emblem_bg_left.png b/Graphics/global/nameplate/dan_emblem_bg_left.png deleted file mode 100644 index f58e5de0..00000000 --- a/Graphics/global/nameplate/dan_emblem_bg_left.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9aec8f79e0d4024684f4c5c046ecc4953a1b1cb1257701b3486100b9b85434b3 -size 176 diff --git a/Graphics/global/nameplate/texture.json b/Graphics/global/nameplate/texture.json index 3e280834..1d63993b 100644 --- a/Graphics/global/nameplate/texture.json +++ b/Graphics/global/nameplate/texture.json @@ -8,10 +8,6 @@ "x": 11.5, "y": 27 }, - "dan_emblem_bg_left": { - "x": 5, - "y": 30 - }, "frame_top": { "crop": [ [0, 0, 272, 32], diff --git a/Scripts/global/nameplate.lua b/Scripts/global/nameplate.lua index e1c03bcd..717b3cfa 100644 --- a/Scripts/global/nameplate.lua +++ b/Scripts/global/nameplate.lua @@ -47,7 +47,6 @@ function Nameplate.new(name, title, player_num, dan, is_gold, is_rainbow, title_ self.frame_top = tex.get_texture("global/nameplate/frame_top") self.frame_top_rainbow = tex.get_texture("global/nameplate/frame_top_rainbow") self.dan_emblem_bg = tex.get_texture("global/nameplate/dan_emblem_bg") - self.dan_emblem_bg_left = tex.get_texture("global/nameplate/dan_emblem_bg_left") self.dan_emblem = tex.get_texture("global/nameplate/dan_emblem") self.dan_emblem_gold = tex.get_texture("global/nameplate/dan_emblem_gold") self.shimmer = tex.get_texture("global/nameplate/shimmer") @@ -167,11 +166,8 @@ function Nameplate:draw(x, y, fade) if self.now and self.shiny then self:draw_sparkles(x, y, fade) end local dan_offset = 0 - if self.dan ~= -1 then - -- the chip curves in around the badge; without one, fill the plate out to its left end - if not self.pnum_tex and self.dan_emblem_bg_left then - tex.draw_texture(self.dan_emblem_bg_left, { x = x, y = y, fade = fade }) - end + -- a plate without a player badge (the entry screen) shows no dan + if self.dan ~= -1 and self.pnum_tex then tex.draw_texture(self.dan_emblem_bg, { x = x, y = y, fade = fade }) if self.is_gold then tex.draw_texture(self.dan_emblem_gold, { frame = self.dan, x = x, y = y, fade = fade }) -- 2.54.0