mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Refine chat input focus behavior
This commit is contained in:
parent
8bdf0a2e79
commit
866877cad0
1 changed files with 5 additions and 5 deletions
|
|
@ -402,11 +402,6 @@ void GameScreen::renderChatWindow(game::GameHandler& gameHandler) {
|
|||
chatWindowPos_ = ImGui::GetWindowPos();
|
||||
}
|
||||
|
||||
// Click anywhere in chat window → focus the input field
|
||||
if (ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && ImGui::IsMouseClicked(0)) {
|
||||
refocusChatInput = true;
|
||||
}
|
||||
|
||||
// Chat history
|
||||
const auto& chatHistory = gameHandler.getChatHistory();
|
||||
|
||||
|
|
@ -440,6 +435,11 @@ void GameScreen::renderChatWindow(game::GameHandler& gameHandler) {
|
|||
|
||||
ImGui::EndChild();
|
||||
|
||||
// Click on chat history area → focus the input field
|
||||
if (ImGui::IsItemClicked()) {
|
||||
refocusChatInput = true;
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::Separator();
|
||||
ImGui::Spacing();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue