staticconstfloatWINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER=0.04f;// Reduce visual noise by only highlighting the border after a certain time.
staticconstfloatWINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER=0.70f;// Lock scrolled window (so it doesn't pick child windows that are scrolling through) for a certain time, unless mouse moved.
// Tooltip offset
staticconstImVec2TOOLTIP_DEFAULT_OFFSET=ImVec2(16,10);// Multiplied by g.Style.MouseCursorScale
// The default tooltip position is a little offset to give space to see the context menu (it's also clamped within the current viewport/monitor)
// In the context of a dragging tooltip we try to reduce that offset and we enforce following the cursor.
// Whatever we do we want to call SetNextWindowPos() to enforce a tooltip position and disable clipping the tooltip without our display area, like regular tooltip do.
// Drag and Drop tooltips are positioning differently than other tooltips:
// - offset visibility to increase visibility around mouse.
// - never clamp within outer viewport boundary.
// We call SetNextWindowPos() to enforce position and disable clamping.
// See FindBestWindowPosForPopup() for positionning logic of other tooltips (not drag and drop ones).
//PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * 0.60f); // This would be nice but e.g ColorButton with checkboard has issue with transparent colors :(
// Position tooltip (always follows mouse + clamp within outer boundaries)
// Note that drag and drop tooltips are NOT using this path: BeginTooltipEx() manually sets their position.
// In theory we could handle both cases in same location, but requires a bit of shuffling as drag and drop tooltips are calling SetWindowPos() leading to 'window_pos_set_by_api' being set in Begin()
r_avoid=ImRect(ref_pos.x-16,ref_pos.y-8,ref_pos.x+24*sc,ref_pos.y+24*sc);// FIXME: Hard-coded based on mouse cursor shape expectation. Exact dimension not very important.
r_avoid=ImRect(ref_pos.x-16,ref_pos.y-8,ref_pos.x+24*scale,ref_pos.y+24*scale);// FIXME: Hard-coded based on mouse cursor shape expectation. Exact dimension not very important.