Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-22-22, 09:55 AM   #1
dust514
A Defias Bandit
Join Date: Oct 2022
Posts: 2
Question wow ScrollFrame ui

This is my first time using Lua and I try to make the button scroll

I would like to know how to make the button scroll in the ScrollFrame

Sorry, English is not my native language

I hope someone can help me, this confused me for a long time,Thanks

Code:
local fk_ui = {}
local backdrop = {
    bgFile = "Interface/BUTTONS/WHITE8X8",
    edgeFile = "Interface/GLUES/Common/Glue-Tooltip-Border",
    tile = true,
    edgeSize = 8,
    tileSize = 8,
    insets = {
        left = 5,
        right = 5,
        top = 5,
        bottom = 5,
    },
}

local f = CreateFrame("Frame", "MyScrollMessageTextFrame", UIParent)
f:SetSize(450, 450)
f:SetPoint("CENTER")
f:SetFrameStrata("BACKGROUND")
f:SetBackdrop(backdrop)
f:SetBackdropColor(0, 0, 0)
f.Close = CreateFrame("Button", "$parentClose", f)
f.Close:SetSize(24, 24)
f.Close:SetPoint("TOPRIGHT")
f.Close:SetNormalTexture("Interface/Buttons/UI-Panel-MinimizeButton-Up")
f.Close:SetPushedTexture("Interface/Buttons/UI-Panel-MinimizeButton-Down")
f.Close:SetHighlightTexture("Interface/Buttons/UI-Panel-MinimizeButton-Highlight", "ADD")
f.Close:SetScript("OnClick", function(self)
    self:GetParent():Hide()
end)

f.SF = CreateFrame("ScrollFrame", "$parent_DF", f, "UIPanelScrollFrameTemplate")
f.SF:SetPoint("TOPLEFT", f, 12, -30)
f.SF:SetPoint("BOTTOMRIGHT", f, -30, 10)

for i = 1,15 do
	fk_ui[i] = "fk_1a"..i
	fk_ui[i] = CreateFrame("Button",fk_ui[i],fk_box,"GameMenuButtonTemplate")
	fk_ui[i]:SetPoint("CENTER",-6,120+(i*-40))
	fk_ui[i]:SetSize(128,35)
end
this is all

I referenced the content here
https://www.wowinterface.com/forums/...50&postcount=2

  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » wow ScrollFrame ui


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off