fix chat not closing properly
This commit is contained in:
@@ -9,8 +9,8 @@ namespace gui {
|
||||
|
||||
BlitzGui::BlitzGui(Client* client) : GuiWidget(nullptr, client) {
|
||||
Enable();
|
||||
AddWidget(std::make_unique<MainMenu>(client));
|
||||
AddWidget(std::make_unique<GameChatGui>(this, client));
|
||||
AddWidget(std::make_unique<MainMenu>(client));
|
||||
SetCustomTheme();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,8 +82,9 @@ void GameChatGui::Render() {
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Enter)) {
|
||||
showCHAT = true;
|
||||
m_FocusRequested = true;
|
||||
} else if (ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
} else if (ImGui::IsKeyPressed(ImGuiKey_Escape) && showCHAT) {
|
||||
showCHAT = false;
|
||||
ImGui::GetIO().ClearInputKeys();
|
||||
}
|
||||
|
||||
if (showCHAT) {
|
||||
|
||||
Reference in New Issue
Block a user