mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Remove CaptureInputCharactersFromApp and minor cleanups (#305)
This commit is contained in:
@ -1903,9 +1903,9 @@ void ImGui::NewFrame()
|
||||
bool mouse_owned_by_application = mouse_earliest_button_down != -1 && !g.IO.MouseDownOwned[mouse_earliest_button_down];
|
||||
g.IO.WantCaptureMouse = (!mouse_owned_by_application && g.HoveredWindow != NULL) || (!mouse_owned_by_application && mouse_any_down) || (g.ActiveId != 0) || (!g.OpenedPopupStack.empty()) || (g.CaptureMouseNextFrame);
|
||||
g.IO.WantCaptureKeyboard = (g.ActiveId != 0) || (g.CaptureKeyboardNextFrame);
|
||||
g.IO.WantInputCharacters = ((g.InputTextState.Id != 0) && (g.InputTextState.Id == g.ActiveId)) || g.WantInputCharactersNextFrame;
|
||||
g.IO.WantInputCharacters = (g.ActiveId != 0 && g.InputTextState.Id == g.ActiveId);
|
||||
g.MouseCursor = ImGuiMouseCursor_Arrow;
|
||||
g.CaptureMouseNextFrame = g.CaptureKeyboardNextFrame = g.WantInputCharactersNextFrame = false;
|
||||
g.CaptureMouseNextFrame = g.CaptureKeyboardNextFrame = false;
|
||||
|
||||
// If mouse was first clicked outside of ImGui bounds we also cancel out hovering.
|
||||
if (mouse_owned_by_application)
|
||||
@ -2877,11 +2877,6 @@ void ImGui::CaptureMouseFromApp()
|
||||
GImGui->CaptureMouseNextFrame = true;
|
||||
}
|
||||
|
||||
void ImGui::CaptureInputCharactersFromApp()
|
||||
{
|
||||
GImGui->WantInputCharactersNextFrame = true;
|
||||
}
|
||||
|
||||
bool ImGui::IsItemHovered()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
|
Reference in New Issue
Block a user