mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
ImGui: fix console input suggestions bug
Don't draw the suggestions window if the console has been collapsed.
This commit is contained in:
parent
8f09ac1b86
commit
4578401f33
@ -128,6 +128,8 @@ void CConsole::RunFrame(void)
|
|||||||
//ImGui::ShowDemoWindow();
|
//ImGui::ShowDemoWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool drawn = false;
|
||||||
|
|
||||||
/**************************
|
/**************************
|
||||||
* BASE PANEL SETUP *
|
* BASE PANEL SETUP *
|
||||||
**************************/
|
**************************/
|
||||||
@ -169,10 +171,14 @@ void CConsole::RunFrame(void)
|
|||||||
}
|
}
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(flWidth, flHeight)); nVars++;
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(flWidth, flHeight)); nVars++;
|
||||||
|
|
||||||
DrawSurface();
|
drawn = DrawSurface();
|
||||||
ImGui::PopStyleVar(nVars);
|
ImGui::PopStyleVar(nVars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we didn't draw the console, don't draw the suggest panel
|
||||||
|
if (!drawn)
|
||||||
|
return;
|
||||||
|
|
||||||
/**************************
|
/**************************
|
||||||
* SUGGESTION PANEL SETUP *
|
* SUGGESTION PANEL SETUP *
|
||||||
**************************/
|
**************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user