WIP: Add a research tree view #1

Closed
williamjcm wants to merge 22 commits from research-tree into master
Showing only changes of commit 562758109c - Show all commits

View file

@ -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() {