Originally Posted by LudiusMaximus
Could you also tell me how to do this in Wrath Classic?
|
Wrath Classic just has the
OnValueChanged script on
.scrollBar. The
OnMouseWheel script on the scroll frame just calls
:SetValue() on the bar, which triggers it.
Lua Code:
AchievementFrameAchievementsContainer.ScrollBar:HookScript("OnValueChanged",function(self,value)
print(value);
end);
Originally Posted by LudiusMaximus
In general: What did you do to see all the scripts of the scroll bar/box?
|
Most of what I've done has been tweaking Blizzard code to add features or change how things worked. I've just had a lot of experience in reading Blizzard's UI source code to know where to look to find things. In this case, I looked for the initialization function(s) that are called on load that registers handling user interaction and follow the trail. It helps having an IDE that lets you search an entire directory tree for a keyword.
Originally Posted by LudiusMaximus
Could you recommend a resource where I could learn about the details of CallbackRegistries?
|
I learned it from reading Blizzard's source code, but Warcraft Wiki has a page on it.
https://warcraft.wiki.gg/wiki/EventRegistry
Note: The linked page appears to be a merged topic on the EventRegistry (aka GlobalCallbackRegistry), but there is a section about the CallbackRegistryMixin.
If you want to see the relevant code yourself:
SharedXML/GlobalCallbackRegistry.lua
SharedXML/CallbackRegistry.lua