mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Scrolling, Nav: Fixed programmatic scroll leading to a slightly incorrect scroll offset when the window has decorations or a menu-bar (broken in 1.71). This was mostly noticeable when a keyboard/gamepad movement led to scrolling the view, or using e.g. SetScrollHereY() function. Fix/amend a0994d74
.
This commit is contained in:
@ -1499,7 +1499,9 @@ namespace ImGui
|
||||
// Scrolling
|
||||
IMGUI_API void SetScrollX(ImGuiWindow* window, float new_scroll_x);
|
||||
IMGUI_API void SetScrollY(ImGuiWindow* window, float new_scroll_y);
|
||||
IMGUI_API void ScrollToBringItemIntoView(ImGuiWindow* window, const ImRect& item_rect);
|
||||
IMGUI_API void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio = 0.5f);
|
||||
IMGUI_API void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio = 0.5f);
|
||||
IMGUI_API void ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& item_rect);
|
||||
|
||||
// Basic Accessors
|
||||
inline ImGuiID GetItemID() { ImGuiContext& g = *GImGui; return g.CurrentWindow->DC.LastItemId; }
|
||||
|
Reference in New Issue
Block a user