mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +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();
|
chatWindowPos_ = ImGui::GetWindowPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click anywhere in chat window → focus the input field
|
|
||||||
if (ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && ImGui::IsMouseClicked(0)) {
|
|
||||||
refocusChatInput = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Chat history
|
// Chat history
|
||||||
const auto& chatHistory = gameHandler.getChatHistory();
|
const auto& chatHistory = gameHandler.getChatHistory();
|
||||||
|
|
||||||
|
|
@ -440,6 +435,11 @@ void GameScreen::renderChatWindow(game::GameHandler& gameHandler) {
|
||||||
|
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
|
||||||
|
// Click on chat history area → focus the input field
|
||||||
|
if (ImGui::IsItemClicked()) {
|
||||||
|
refocusChatInput = true;
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue