From 52b767619cc85f986453c09d9653b460c3b133cf Mon Sep 17 00:00:00 2001 From: Anthony Stewart Date: Fri, 11 Jul 2025 23:18:54 -0500 Subject: [PATCH] Move the Show Region Logic Button next to the From Region Access. --- .../randomizer/randomizer_logic_tracker.cpp | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_logic_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_logic_tracker.cpp index 5358384d2..a61b4920e 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_logic_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_logic_tracker.cpp @@ -431,6 +431,8 @@ static void DrawNode(LogicTrackerNode& node) { } if (nodeOpen) { + ImGui::Indent(25.0f); + for (int i = 0; i < node.Connections.size(); i++) { auto& connection = node.Connections[i]; ImGui::PushID(connection.ParentName.c_str()); @@ -441,7 +443,8 @@ static void DrawNode(LogicTrackerNode& node) { if (connection.ChildDayAccess && connection.ChildNightAccess && connection.AdultDayAccess && connection.AdultNightAccess) { access += "All"; - } else { + } else if (connection.ChildDayAccess || connection.ChildNightAccess || connection.AdultDayAccess || + connection.AdultNightAccess) { std::vector accessParts; if (connection.ChildDayAccess && connection.ChildNightAccess) { accessParts.push_back("Child"); @@ -471,15 +474,13 @@ static void DrawNode(LogicTrackerNode& node) { access += accessParts[i]; } } + } else { + access = "None"; } - if (ImGui::Button(ICON_FA_COGS)) { - LogicTrackerWindow::ShowRandomizerRegion(connection.ParentRandomizerRegion, node.RandomizerRegion); + if (expandingNode) { + ImGui::SetNextItemOpen(expandNodeId == node.NodeId, ImGuiCond_Always); } - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Show Region Logic"); - } - ImGui::SameLine(); bool connectionOpen = ImGui::CollapsingHeader( ("From " + connection.ParentName).c_str(), ImGuiTreeNodeFlags_AllowOverlap | ImGuiTreeNodeFlags_SpanAvailWidth); @@ -493,13 +494,22 @@ static void DrawNode(LogicTrackerNode& node) { ImGui::SetTooltip("Connection Access"); } + ImGui::SameLine(); + if (ImGui::Button(ICON_FA_COGS)) { + LogicTrackerWindow::ShowRandomizerRegion(connection.ParentRandomizerRegion, node.RandomizerRegion); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("Show Region Logic"); + } + if (connectionOpen) { DrawNodeConnection(node, connection); } ImGui::PopID(); } - + + ImGui::Unindent(25.0f); } ImGui::PopID();