Move the Show Region Logic Button next to the From Region Access.

This commit is contained in:
Anthony Stewart 2025-07-11 23:18:54 -05:00 committed by xxAtrain223
commit 52b767619c

View file

@ -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<std::string> 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();