From 562758109c2c258cb8d354a6d898ac1f8831f3f7 Mon Sep 17 00:00:00 2001 From: William JCM Date: Sun, 1 Aug 2021 13:26:44 +0200 Subject: [PATCH] SaveTool: improve the looks of nodes. --- src/SaveTool/SaveTool_MainManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SaveTool/SaveTool_MainManager.cpp b/src/SaveTool/SaveTool_MainManager.cpp index cf1ae18..ec1fc1d 100644 --- a/src/SaveTool/SaveTool_MainManager.cpp +++ b/src/SaveTool/SaveTool_MainManager.cpp @@ -495,6 +495,9 @@ void SaveTool::drawNode(Node& node) { ImGui::TableNextColumn(); bool has_children = (node.children().size() > 0); + if(node.state() == Node::State::Unavailable) { + ImGui::PushStyleColor(ImGuiCol_Text, ImGui::GetStyleColorVec4(ImGuiCol_TextDisabled)); + } if(has_children) { bool open = ImGui::TreeNodeEx(node.name(), ImGuiTreeNodeFlags_SpanAvailWidth|(node.state() == Node::State::Unlocked ? ImGuiTreeNodeFlags_Selected : 0)); nodeTooltip(); @@ -510,6 +513,9 @@ void SaveTool::drawNode(Node& node) { ImGuiTreeNodeFlags_Bullet|(node.state() == Node::State::Unlocked ? ImGuiTreeNodeFlags_Selected : 0)); nodeTooltip(); } + if(node.state() == Node::State::Unavailable) { + ImGui::PopStyleColor(); + } } void SaveTool::drawMassManager() {