mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
Nav, Focus: Changed SetKeyboardFocusHere() to not behave if a drag or window moving is in progress + move KeepAliveID() call from Scrollbar() to ScrollbarEx()
This commit is contained in:
@ -880,9 +880,7 @@ void ImGui::Scrollbar(ImGuiAxis axis)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
|
||||
const ImGuiID id = GetWindowScrollbarID(window, axis);
|
||||
KeepAliveID(id);
|
||||
|
||||
// Calculate scrollbar bounding box
|
||||
ImRect bb = GetWindowScrollbarRect(window, axis);
|
||||
@ -920,6 +918,8 @@ bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS6
|
||||
if (window->SkipItems)
|
||||
return false;
|
||||
|
||||
KeepAliveID(id);
|
||||
|
||||
const float bb_frame_width = bb_frame.GetWidth();
|
||||
const float bb_frame_height = bb_frame.GetHeight();
|
||||
if (bb_frame_width <= 0.0f || bb_frame_height <= 0.0f)
|
||||
|
Reference in New Issue
Block a user