comparison Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua @ 17:3000eccbf1a0 v7.3.0.017

- ToC Update.
author Tercio
date Sat, 02 Sep 2017 14:10:48 -0300
parents 371e14cd2feb
children
comparison
equal deleted inserted replaced
16:6c64dd7f16a2 17:3000eccbf1a0
3 Plain container that scrolls its content and doesn't grow in height. 3 Plain container that scrolls its content and doesn't grow in height.
4 -------------------------------------------------------------------------------]] 4 -------------------------------------------------------------------------------]]
5 local Type, Version = "ScrollFrame", 24 5 local Type, Version = "ScrollFrame", 24
6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) 6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end 7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
8
9 local IsLegion = select(4, GetBuildInfo()) >= 70000
10 8
11 -- Lua APIs 9 -- Lua APIs
12 local pairs, assert, type = pairs, assert, type 10 local pairs, assert, type = pairs, assert, type
13 local min, max, floor, abs = math.min, math.max, math.floor, math.abs 11 local min, max, floor, abs = math.min, math.max, math.floor, math.abs
14 12
176 -- set the script as the last step, so it doesn't fire yet 174 -- set the script as the last step, so it doesn't fire yet
177 scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged) 175 scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged)
178 176
179 local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") 177 local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
180 scrollbg:SetAllPoints(scrollbar) 178 scrollbg:SetAllPoints(scrollbar)
181 if IsLegion then 179 scrollbg:SetColorTexture(0, 0, 0, 0.4)
182 scrollbg:SetColorTexture(0, 0, 0, 0.4)
183 else
184 scrollbg:SetTexture(0, 0, 0, 0.4)
185 end
186 180
187 --Container Support 181 --Container Support
188 local content = CreateFrame("Frame", nil, scrollframe) 182 local content = CreateFrame("Frame", nil, scrollframe)
189 content:SetPoint("TOPLEFT") 183 content:SetPoint("TOPLEFT")
190 content:SetPoint("TOPRIGHT") 184 content:SetPoint("TOPRIGHT")