comparison Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua @ 106:e635cd648e01 v49

7.2 update
author yellowfive
date Tue, 28 Mar 2017 16:10:00 -0700
parents 01b63b8ed811
children
comparison
equal deleted inserted replaced
105:3ce266c86bd3 106:e635cd648e01
7 7
8 -- Lua APIs 8 -- Lua APIs
9 local select, pairs, print = select, pairs, print 9 local select, pairs, print = select, pairs, print
10 10
11 -- WoW APIs 11 -- WoW APIs
12 local CreateFrame, UIParent, GetBuildInfo = CreateFrame, UIParent, GetBuildInfo 12 local CreateFrame, UIParent = CreateFrame, UIParent
13 13
14 --[[----------------------------------------------------------------------------- 14 --[[-----------------------------------------------------------------------------
15 Scripts 15 Scripts
16 -------------------------------------------------------------------------------]] 16 -------------------------------------------------------------------------------]]
17 local function Control_OnEnter(frame) 17 local function Control_OnEnter(frame)
129 type = Type 129 type = Type
130 } 130 }
131 for method, func in pairs(methods) do 131 for method, func in pairs(methods) do
132 widget[method] = func 132 widget[method] = func
133 end 133 end
134 -- SetText is deprecated, but keep it around for a while. (say, to WoW 4.0) 134
135 if (select(4, GetBuildInfo()) < 40000) then 135 widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
136 widget.SetText = widget.SetLabel
137 else
138 widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
139 end
140 136
141 return AceGUI:RegisterAsWidget(widget) 137 return AceGUI:RegisterAsWidget(widget)
142 end 138 end
143 139
144 AceGUI:RegisterWidgetType(Type, Constructor, Version) 140 AceGUI:RegisterWidgetType(Type, Constructor, Version)