diff --git a/src/menu.cpp b/src/menu.cpp index bbcc481..261d09f 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -214,8 +214,7 @@ void Menu::DrawShortcutsWindow() ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(ImGui::GetStyle().FramePadding.x, resY / 130)); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(3, 3)); - ImGui::SetNextItemWidth(resX); - ImGui::SetKeyboardFocusHere(-1); + ImGui::SetNextItemWidth(ImGui::GetContentRegionMax().x); if (ImGui::InputTextWithHint("##TEXTFIELD", "Enter command", m_Commands::m_nInputBuffer, INPUT_BUFFER_SIZE, ImGuiInputTextFlags_EnterReturnsTrue)) @@ -224,7 +223,10 @@ void Menu::DrawShortcutsWindow() m_Commands::m_bShowMenu = false; strcpy(m_Commands::m_nInputBuffer, ""); } - + if (!ImGui::IsAnyItemActive()) + { + ImGui::SetKeyboardFocusHere(-1); + } ImGui::PopStyleVar(2); ImGui::End(); } diff --git a/src/menuinfo.h b/src/menuinfo.h index 2dbdd44..58d3015 100644 --- a/src/menuinfo.h +++ b/src/menuinfo.h @@ -2,5 +2,5 @@ #define MENU_NAME "Cheat Menu" #define MENU_VERSION_NUMBER "3.0" #define MENU_VERSION MENU_VERSION_NUMBER"-beta" -#define BUILD_NUMBER "20211026" +#define BUILD_NUMBER "20211101" #define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"