replace Ace3v with Ace3 ElvUI-TBC version

or easy tracking of code difference
This commit is contained in:
Pinya
2018-07-21 13:20:39 +03:00
parent bb867629d5
commit 332d53e7f6
59 changed files with 1975 additions and 2496 deletions
@@ -6,7 +6,7 @@ local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs
local pairs, print = pairs, print
local select, pairs, print = select, pairs, print
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
@@ -14,16 +14,16 @@ local CreateFrame, UIParent = CreateFrame, UIParent
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function Control_OnEnter()
this.obj:Fire("OnEnter")
local function Control_OnEnter(frame)
frame.obj:Fire("OnEnter")
end
local function Control_OnLeave()
this.obj:Fire("OnLeave")
local function Control_OnLeave(frame)
frame.obj:Fire("OnLeave")
end
local function Button_OnClick()
this.obj:Fire("OnClick", 1, arg1)
local function Button_OnClick(frame, button)
frame.obj:Fire("OnClick", button)
AceGUI:ClearFocus()
end
@@ -53,13 +53,14 @@ local methods = {
end
end,
["SetImage"] = function(self, path, a1,a2,a3,a4,a5,a6,a7,a8)
["SetImage"] = function(self, path, ...)
local image = self.image
image:SetTexture(path)
if image:GetTexture() then
if a4 or a8 then
image:SetTexCoord(a1,a2,a3,a4,a5,a6,a7,a8)
local n = select("#", ...)
if n == 4 or n == 8 then
image:SetTexCoord(...)
else
image:SetTexCoord(0, 1, 0, 1)
end
@@ -131,7 +132,7 @@ local function Constructor()
widget[method] = func
end
widget.SetText = function(self,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) end
widget.SetText = widget.SetLabel
return AceGUI:RegisterAsWidget(widget)
end