mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00: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:
parent
ddcff10343
commit
27343efb0b
3 changed files with 14 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue