@ -5983,14 +5983,44 @@ static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& si
}
elseif(held)
{
// Switch to relative resizing mode when border geometry moved (e.g. resizing a child altering parent scroll), in order to avoid resizing feedback loop.
// Currently only using relative mode on resizable child windows, as the problem to solve is more likely noticeable for them, but could apply for all windows eventually.
// FIXME: May want to generalize this idiom at lower-level, so more widgets can use it!
constfloatborder_target_abs_mode_for_axis=g.IO.MousePos[axis]-g.ActiveIdClickOffset[axis]+WINDOWS_HOVER_PADDING;// Match ButtonBehavior() padding above.
ImGuiWindow*WheelingWindow;// Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
ImVec2WheelingWindowRefMousePos;
intWheelingWindowStartFrame;// This may be set one frame before WheelingWindow is != NULL
intWheelingWindowScrolledFrame;
floatWheelingWindowReleaseTimer;
ImVec2WheelingWindowWheelRemainder;
ImVec2WheelingAxisAvg;
@ -2091,6 +2092,8 @@ struct ImGuiContext
ImU32ColorEditSavedColor;// RGB value with alpha set to 0.
ImVec4ColorPickerRef;// Initial/reference color at the time of opening the color picker.
ImGuiComboPreviewDataComboPreviewData;
ImRectWindowResizeBorderExpectedRect;// Expected border rect, switch to relative edit if moving
boolWindowResizeRelativeMode;
floatSliderGrabClickOffset;
floatSliderCurrentAccum;// Accumulated slider delta when using navigation controls.
boolSliderCurrentAccumDirty;// Has the accumulated slider delta changed since last time we tried to apply it?