From ee6fb57aa2806592496e9b8a91e9a1aa807c2554 Mon Sep 17 00:00:00 2001 From: Mohab <133429578+MohabCodeX@users.noreply.github.com> Date: Tue, 9 Sep 2025 17:16:13 +0300 Subject: [PATCH] Enhance GUI input handling --- Client/core/CGUI.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Client/core/CGUI.cpp b/Client/core/CGUI.cpp index 573b6e3e68c..ae01c15cf6d 100644 --- a/Client/core/CGUI.cpp +++ b/Client/core/CGUI.cpp @@ -700,9 +700,21 @@ bool CLocalGUI::InputGoesToGUI() if (!pGUI) return false; - // Here we're supposed to check if things like menues are up, console is up or the chatbox is expecting input - // If the console is visible OR the chat is expecting input OR the mainmenu is visible - return (IsConsoleVisible() || IsMainMenuVisible() || IsChatBoxInputEnabled() || m_bForceCursorVisible || pGUI->GetGUIInputEnabled() || + bool shouldShowCursorForGUI = false; + if (pGUI->GetGUIInputEnabled()) + { + eInputMode inputMode = pGUI->GetGUIInputMode(); + if (inputMode == INPUTMODE_NO_BINDS_ON_EDIT) + { + shouldShowCursorForGUI = true; + } + else if (inputMode == INPUTMODE_NO_BINDS) + { + shouldShowCursorForGUI = false; + } + } + + return (IsConsoleVisible() || IsMainMenuVisible() || IsChatBoxInputEnabled() || m_bForceCursorVisible || shouldShowCursorForGUI || !CCore::GetSingleton().IsFocused() || IsWebRequestGUIVisible()); }