mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Auto expand the connection if there's only one.
This commit is contained in:
parent
20d8a45953
commit
9236fd3683
1 changed files with 6 additions and 2 deletions
|
@ -653,8 +653,9 @@ static void DrawNode(LogicTrackerNode& node) {
|
||||||
|
|
||||||
auto& connectionHeader = connection.ParentName;
|
auto& connectionHeader = connection.ParentName;
|
||||||
|
|
||||||
std::string accessAvailable =
|
if (expandingNode && node.Connections.size() == 1) {
|
||||||
GetAccessString(connection) + " " + ICON_FA_ARROW_RIGHT + " " + GetAvailableString(connection);
|
ImGui::SetNextItemOpen(expandNodeId == node.NodeId, ImGuiCond_Always);
|
||||||
|
}
|
||||||
|
|
||||||
bool connectionOpen =
|
bool connectionOpen =
|
||||||
ImGui::CollapsingHeader(("From " + connection.ParentName).c_str(),
|
ImGui::CollapsingHeader(("From " + connection.ParentName).c_str(),
|
||||||
|
@ -663,6 +664,9 @@ static void DrawNode(LogicTrackerNode& node) {
|
||||||
ImGui::SetTooltip("Show Connection Logic");
|
ImGui::SetTooltip("Show Connection Logic");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string accessAvailable =
|
||||||
|
GetAccessString(connection) + " " + ICON_FA_ARROW_RIGHT + " " + GetAvailableString(connection);
|
||||||
|
|
||||||
ImGui::SameLine(ImGui::GetContentRegionAvail().x - ImGui::CalcTextSize(accessAvailable.c_str()).x);
|
ImGui::SameLine(ImGui::GetContentRegionAvail().x - ImGui::CalcTextSize(accessAvailable.c_str()).x);
|
||||||
ImGui::TextUnformatted(accessAvailable.c_str());
|
ImGui::TextUnformatted(accessAvailable.c_str());
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue