GUI: fix
This commit is contained in:
parent
1b3723c895
commit
fd6fc801a5
|
@ -24,13 +24,11 @@
|
||||||
|
|
||||||
void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& accepted) {
|
void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& accepted) {
|
||||||
for (FurnaceGUISysDef& i: category) {
|
for (FurnaceGUISysDef& i: category) {
|
||||||
|
bool treeNode=false;
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
if (!i.subDefs.empty()) {
|
if (!i.subDefs.empty()) {
|
||||||
if (ImGui::TreeNode("##TreeShit")) {
|
treeNode=ImGui::TreeNode("##TreeShit");
|
||||||
drawSysDefs(i.subDefs,accepted);
|
|
||||||
ImGui::TreePop();
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
if (ImGui::Selectable(i.name,false,ImGuiSelectableFlags_DontClosePopups)) {
|
if (ImGui::Selectable(i.name,false,ImGuiSelectableFlags_DontClosePopups)) {
|
||||||
|
@ -38,6 +36,10 @@ void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& acce
|
||||||
nextDescName=i.name;
|
nextDescName=i.name;
|
||||||
accepted=true;
|
accepted=true;
|
||||||
}
|
}
|
||||||
|
if (treeNode) {
|
||||||
|
drawSysDefs(i.subDefs,accepted);
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
if (ImGui::BeginTooltip()) {
|
if (ImGui::BeginTooltip()) {
|
||||||
std::map<DivSystem,int> chipCounts;
|
std::map<DivSystem,int> chipCounts;
|
||||||
|
|
Loading…
Reference in a new issue