mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
* fix(frame): keep a scroll child clipped when its ScrollFrame moves A frame a ScrollFrame draws carries a "scrolled" flag (0x2000 at +0xB4): the strata pass skips it and the ScrollFrame draws it inside a viewport cut to its rect. SetScrollChild sets the flag through the setter at 0x0076A400, which also marks the scroll child (0x4000) and recurses into child frames. SetParent sets a moved frame's flag from its new parent through the same setter, and the recursion doesn't stop at a ScrollFrame, so moving a frame that holds a ScrollFrame under an unscrolled parent cleared the flag on the scroll child and everything in it. The strata pass then drew them whole, past the ScrollFrame's edges. AceGUI-3.0 builds each widget under UIParent and then moves it into its container, so every AceGUI ScrollFrame spilled: AceConfigDialog-3.0's pages drew below the Interface Options window (61 frames under Zygor Guides Viewer 2.0's "Display" scroll child had lost the flag). Hook the setter to keep a frame marked as a scroll child scrolled when a value is only being passed down (third argument -1). SetScrollChild's own calls are unchanged. Verified in-game (1.12.1 client via VanillaFixes, Zygor Guides Viewer 2.0): AceConfigDialog-3.0's Interface Options pages clip and scroll inside their box; on the "Display" page no frame under the scroll child lacks the flag any more (61 did before), and a ScrollFrame built under UIParent and then moved keeps its content, its content's children and a child added afterwards scrolled. * docs(frame): describe ScrollFrame clipping without version history State what stays clipped and when, with AceGUI-3.0 as the case it serves. Remove the vanilla comparison and the engine flag explanation; the comment in src/frame/ScrollChildren.cpp already records them. * fix(frame): skip scroll children the way 3.3.5's setter does 3.3.5's CSimpleFrame::SetBeingScrolled (0x00490F60) does not pass the scrolled value into a child frame marked as the scroll child, and its direct call is not gated: a scroll child that is itself given a new parent takes the new parent's value. The hook forced any scroll child scrolled on a pass-down call, which also kept a directly reparented scroll child clipped to its old ScrollFrame. Skip a scroll child only inside the setter's own recursion, told apart by a depth counter (the setter is its only nested caller). SetParent's and SetScrollChild's direct calls run unchanged. --------- Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>