View Single Post
04-23-24, 06:16 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,330
I'm seeing more, but ultimately, all of .ScrollBox's scripts manipulate .ScrollBar, which fires an OnScroll event through its inherited CallbackRegistry. The event fires with the scroll percent, so you don't need to fetch it yourself.

Lua Code:
  1. local ScrollBar=AchievementFrameAchievements.ScrollBar;
  2. ScrollBar:RegisterCallback(ScrollBar.Event.OnScroll,function(_,scrollpercent)
  3.     print(scrollpercent);
  4. end);

Sources of note:
ScrollUtil.InitScrollFrameWithScrollBar() - SharedXML/Scroll/ScrollUtil.lua:197
ScrollBarMixin:SetScrollPercentage() & ScrollBarMixin:SetScrollPercentageInternal() - SharedXML/Scroll/ScrollBar.lua:163 & 180
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 04-23-24 at 06:55 AM.
  Reply With Quote