mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-23 04:17:00 +00:00
This commit is contained in:
parent
e10ecfe28a
commit
c816e6c742
@ -4113,7 +4113,8 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|||||||
// Apply scrolling
|
// Apply scrolling
|
||||||
if (window->ScrollTarget.x < FLT_MAX)
|
if (window->ScrollTarget.x < FLT_MAX)
|
||||||
{
|
{
|
||||||
window->Scroll.x = window->ScrollTarget.x;
|
float center_ratio = window->ScrollTargetCenterRatio.x;
|
||||||
|
window->Scroll.x = window->ScrollTarget.x - (center_ratio * window->SizeFull.x);
|
||||||
window->ScrollTarget.x = FLT_MAX;
|
window->ScrollTarget.x = FLT_MAX;
|
||||||
}
|
}
|
||||||
if (window->ScrollTarget.y < FLT_MAX)
|
if (window->ScrollTarget.y < FLT_MAX)
|
||||||
|
Loading…
Reference in New Issue
Block a user