Lib Updates

This commit is contained in:
Tercio Jose
2020-09-11 21:12:06 -03:00
parent eabba12e08
commit 39e4abb2c1
15 changed files with 78 additions and 49 deletions
@@ -1,4 +1,4 @@
--[[ $Id: AceGUIWidget-DropDown.lua 1209 2019-06-24 21:01:01Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1237 2020-07-17 22:50:38Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
-- Lua APIs
@@ -39,7 +39,7 @@ end
do
local widgetType = "Dropdown-Pullout"
local widgetVersion = 3
local widgetVersion = 4
--[[ Static data ]]--
@@ -258,7 +258,7 @@ do
local function Constructor()
local count = AceGUI:GetNextWidgetNum(widgetType)
local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent)
local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil)
local self = {}
self.count = count
self.type = widgetType
@@ -309,7 +309,7 @@ do
scrollFrame.obj = self
itemFrame.obj = self
local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame)
local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame, BackdropTemplateMixin and "BackdropTemplate" or nil)
slider:SetOrientation("VERTICAL")
slider:SetHitRectInsets(0, 0, -10, 0)
slider:SetBackdrop(sliderBackdrop)
@@ -356,7 +356,7 @@ end
do
local widgetType = "Dropdown"
local widgetVersion = 34
local widgetVersion = 35
--[[ Static data ]]--
@@ -465,6 +465,7 @@ do
self:SetWidth(200)
self:SetLabel()
self:SetPulloutWidth(nil)
self.list = {}
end
-- exported, AceGUI callback
@@ -535,9 +536,7 @@ do
-- exported
local function SetValue(self, value)
if self.list then
self:SetText(self.list[value] or "")
end
self:SetText(self.list[value] or "")
self.value = value
end
@@ -601,7 +600,7 @@ do
end
end
local function SetList(self, list, order, itemType)
self.list = list
self.list = list or {}
self.pullout:Clear()
self.hasClose = nil
if not list then return end
@@ -629,10 +628,8 @@ do
-- exported
local function AddItem(self, value, text, itemType)
if self.list then
self.list[value] = text
AddListItem(self, value, text, itemType)
end
self.list[value] = text
AddListItem(self, value, text, itemType)
end
-- exported