From d756f2744eb2daad3f994ccc5a6f44862acd0642 Mon Sep 17 00:00:00 2001 From: yamashi Date: Fri, 18 Dec 2020 18:59:44 +0100 Subject: [PATCH] Enter executes function --- src/overlay/Overlay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlay/Overlay.cpp b/src/overlay/Overlay.cpp index b800e834..0f8d4b37 100644 --- a/src/overlay/Overlay.cpp +++ b/src/overlay/Overlay.cpp @@ -93,7 +93,7 @@ LRESULT APIENTRY WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) break; } - if(s_pOverlay->IsEnabled() && uMsg != WM_PAINT && uMsg != WM_ACTIVATE && uMsg != WM_QUIT && uMsg != WM_CLOSE) + if(s_pOverlay->IsEnabled() && uMsg != WM_PAINT && uMsg != WM_ACTIVATE && uMsg != WM_QUIT && uMsg != WM_CLOSE && uMsg != WM_DESTROY) { return true; } @@ -247,8 +247,8 @@ void Overlay::Render(IDXGISwapChain3* pSwapChain) static std::vector s_consoleResult; static char command[512] = { 0 }; - ImGui::InputText("Console", command, std::size(command)); - if (ImGui::Button("Execute")) + auto execute = ImGui::InputText("Console", command, std::size(command), ImGuiInputTextFlags_EnterReturnsTrue); + if (ImGui::Button("Execute") || execute) { Result result;