comparison Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua @ 11:371e14cd2feb

- major fixes with icons not showing correctly.
author Tercio
date Thu, 08 Dec 2016 13:01:40 -0200
parents fc346da3afd9
children 3000eccbf1a0
comparison
equal deleted inserted replaced
10:6572ed4edaae 11:371e14cd2feb
1 --[[----------------------------------------------------------------------------- 1 --[[-----------------------------------------------------------------------------
2 ScrollFrame Container 2 ScrollFrame Container
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", 23 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
8 10
9 -- Lua APIs 11 -- Lua APIs
10 local pairs, assert, type = pairs, assert, type 12 local pairs, assert, type = pairs, assert, type
11 local min, max, floor, abs = math.min, math.max, math.floor, math.abs 13 local min, max, floor, abs = math.min, math.max, math.floor, math.abs
12 14
174 -- set the script as the last step, so it doesn't fire yet 176 -- set the script as the last step, so it doesn't fire yet
175 scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged) 177 scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged)
176 178
177 local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") 179 local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
178 scrollbg:SetAllPoints(scrollbar) 180 scrollbg:SetAllPoints(scrollbar)
179 scrollbg:SetTexture(0, 0, 0, 0.4) 181 if IsLegion then
182 scrollbg:SetColorTexture(0, 0, 0, 0.4)
183 else
184 scrollbg:SetTexture(0, 0, 0, 0.4)
185 end
180 186
181 --Container Support 187 --Container Support
182 local content = CreateFrame("Frame", nil, scrollframe) 188 local content = CreateFrame("Frame", nil, scrollframe)
183 content:SetPoint("TOPLEFT") 189 content:SetPoint("TOPLEFT")
184 content:SetPoint("TOPRIGHT") 190 content:SetPoint("TOPRIGHT")