Skip to content

Make the instance buttons in Model Viewer truly unique#131

Merged
MilchRatchet merged 1 commit into
RatchetModding:masterfrom
CreepNT:topic/camera_instances_bug
May 12, 2026
Merged

Make the instance buttons in Model Viewer truly unique#131
MilchRatchet merged 1 commit into
RatchetModding:masterfrom
CreepNT:topic/camera_instances_bug

Conversation

@CreepNT

@CreepNT CreepNT commented May 11, 2026

Copy link
Copy Markdown
Contributor

When hooked to RPCS3, it's possible for mobys to have the same mobyID. Since that's what was used to create the button's label, there were multiple buttons with the same label, which made ImGui unhappy and caused only one instance to be selectable.

Fix by including the guaranteed unique globalID of elements as hidden text in the button label, which makes them unique to ImGui while still showing the same text as before.

While at it, also actually make use of string interpolation in one place that wanted to but did not.

When hooked to RPCS3, it's possible for mobys to have the same mobyID.
Since that's what was used to create the button's label, there were
multiple buttons with the same label, which made ImGui unhappy and
caused only one instance to be selectable.

Fix by including the guaranteed unique globalID of elements as hidden
text in the button label, which makes them unique to ImGui while still
showing the same text as before.
@CreepNT

CreepNT commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

p.s. I think it's actually a bug in the memory hook in that it shows some dead mobys as "alive". but I did not investigate this further

@MilchRatchet MilchRatchet merged commit 4a2e5eb into RatchetModding:master May 12, 2026
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.

2 participants