mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix multiple context menus for collections with identical identifier names.
This commit is contained in:
parent
101a1b7392
commit
7ab5c7311c
1 changed files with 3 additions and 3 deletions
|
|
@ -214,9 +214,9 @@ public sealed class CollectionPanel : IDisposable
|
|||
DrawSettingsList(collection);
|
||||
}
|
||||
|
||||
private void DrawContext(bool open, ModCollection? collection, CollectionType type, ActorIdentifier identifier, char suffix)
|
||||
private void DrawContext(bool open, ModCollection? collection, CollectionType type, ActorIdentifier identifier, string text, char suffix)
|
||||
{
|
||||
var label = $"{type}{identifier}{suffix}";
|
||||
var label = $"{type}{text}{suffix}";
|
||||
if (open)
|
||||
ImGui.OpenPopup(label);
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ public sealed class CollectionPanel : IDisposable
|
|||
var size = ImGui.CalcTextSize(name);
|
||||
var textPos = ImGui.GetItemRectMax() - size - ImGui.GetStyle().FramePadding;
|
||||
ImGui.GetWindowDrawList().AddText(textPos, ImGui.GetColorU32(ImGuiCol.Text), name);
|
||||
DrawContext(button, collection, type, id, suffix);
|
||||
DrawContext(button, collection, type, id, text, suffix);
|
||||
}
|
||||
|
||||
if (hovered)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue