Created
July 18, 2023 20:34
-
-
Save Meorawr/878df1a37cc18326b4be2c320c61da4f to your computer and use it in GitHub Desktop.
Revisions
-
Meorawr created this gist
Jul 18, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ local ScrollBox = CreateFrame("Frame", nil, UIParent, "WowScrollBox") ScrollBox:SetPoint("CENTER") ScrollBox:SetSize(300, 300) ScrollBox:SetInterpolateScroll(true) local ScrollBar = CreateFrame("EventFrame", nil, UIParent, "MinimalScrollBar") ScrollBar:SetPoint("TOPLEFT", ScrollBox, "TOPRIGHT") ScrollBar:SetPoint("BOTTOMLEFT", ScrollBox, "BOTTOMRIGHT") ScrollBar:SetInterpolateScroll(true) local ScrollView = CreateScrollBoxLinearView() ScrollView:SetPanExtent(100) local ScrollChild = CreateFrame("Frame", nil, ScrollBox) ScrollChild:SetSize(300, 1500) ScrollChild.scrollable = true local ScrollChildFill = ScrollChild:CreateTexture() ScrollChildFill:SetAllPoints(ScrollChild) ScrollChildFill:SetColorTexture(1, 1, 1, 1) ScrollChildFill:SetGradient("VERTICAL", CreateColor(0, 0, 0, 1), CreateColor(1, 0, 0, 1)) ScrollUtil.InitScrollBoxWithScrollBar(ScrollBox, ScrollBar, ScrollView)