Skip to content

[DialoguePage Refactor Step 2] Nametag refactor #395

Merged
PringlesGang merged 5 commits intomasterfrom
nametag-refactor
Feb 26, 2026
Merged

[DialoguePage Refactor Step 2] Nametag refactor #395
PringlesGang merged 5 commits intomasterfrom
nametag-refactor

Conversation

@PringlesGang
Copy link
Copy Markdown
Member

@PringlesGang PringlesGang commented Feb 15, 2026

Refactors the whole nametag system for more extensibility, maintainability, and readability

Makes use of an abstract base class approach for the NametagDisplay
Similarly overhauls the DialogueBox class to make better use of the new nametag system

Adds ownership from DialoguePage -> DialogueBox -> NametagDisplay, as each DialoguePage in the MAGES. engine maintains its own textbox state
(I am aware this ownership unnecessarily allocated DialogueBoxes for every backlog and tip entry. I pinky-promise I will finally separate these two from DialoguePage next refactor!)

I also cleaned up the DialoguePage class a bit with how it interacts with the names
Game-specific hud element implementations have also been moved from src/games/game-name to src/hud/game-name

src/hud/nametagdisplay and src/hud/dialoguebox have been completely rewritten, so I suggest reviewing those as effectively "new files," instead of looking at the git diff

Definitely also let me know if you disagree with this overall design, or if you have some better ways (part of) this could be structured

@PringlesGang PringlesGang added this to the 0.9.X Polishing milestone Feb 15, 2026
@PringlesGang PringlesGang self-assigned this Feb 15, 2026
@PringlesGang PringlesGang linked an issue Feb 15, 2026 that may be closed by this pull request
@PringlesGang PringlesGang force-pushed the nametag-refactor branch 5 times, most recently from 8f03e4b to 2a7f915 Compare February 19, 2026 22:49
@Enorovan Enorovan changed the title Nametag refactor [DialoguePage Refactor Step 2] Nametag refactor Feb 20, 2026
@PringlesGang PringlesGang force-pushed the nametag-refactor branch 2 times, most recently from 3bcd3c9 to 2f87339 Compare February 22, 2026 17:13
@PringlesGang PringlesGang marked this pull request as ready for review February 22, 2026 18:45
Comment thread src/profile/dialogue.h Outdated
Comment thread profiles/dash/dialogue.lua Outdated
Copy link
Copy Markdown
Collaborator

@KKhanhH KKhanhH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new api design a lot more, definitely a lot cleaner

Comment thread src/hud/chlcc/dialoguebox.cpp Outdated
Comment thread src/hud/mo6tw/dialoguebox.cpp Outdated
Comment thread src/hud/nametagdisplay.cpp
Comment thread src/hud/nametagdisplay.h Outdated
Comment thread src/text/dialoguepage.h Outdated
Comment thread src/text/text.cpp Outdated
@PringlesGang PringlesGang requested a review from KKhanhH February 25, 2026 14:30
@PringlesGang PringlesGang merged commit 4241b8c into master Feb 26, 2026
11 checks passed
@PringlesGang PringlesGang deleted the nametag-refactor branch February 26, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nametag animation is triggered when the name stays the same

3 participants