WIP: Add a research tree view #1
1 changed files with 6 additions and 3 deletions
|
@ -500,6 +500,9 @@ void SaveTool::drawNode(Node& node) {
|
|||
}
|
||||
if(has_children) {
|
||||
bool open = ImGui::TreeNodeEx(node.name(), ImGuiTreeNodeFlags_SpanAvailWidth|(node.state() == Node::State::Unlocked ? ImGuiTreeNodeFlags_Selected : 0));
|
||||
if(node.state() == Node::State::Unavailable) {
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
nodeTooltip();
|
||||
if(open) {
|
||||
for(Node* child : node.children()) {
|
||||
|
@ -511,11 +514,11 @@ void SaveTool::drawNode(Node& node) {
|
|||
else {
|
||||
ImGui::TreeNodeEx(node.name(), ImGuiTreeNodeFlags_SpanAvailWidth|ImGuiTreeNodeFlags_Leaf|ImGuiTreeNodeFlags_NoTreePushOnOpen|
|
||||
ImGuiTreeNodeFlags_Bullet|(node.state() == Node::State::Unlocked ? ImGuiTreeNodeFlags_Selected : 0));
|
||||
nodeTooltip();
|
||||
}
|
||||
if(node.state() == Node::State::Unavailable) {
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
nodeTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
void SaveTool::drawMassManager() {
|
||||
|
|
Loading…
Reference in a new issue