mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Move the Show Region Logic Button next to the From Region Access.
This commit is contained in:
parent
feac6d1186
commit
52b767619c
1 changed files with 18 additions and 8 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue