mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
Ace3 backport
This commit is contained in:
@@ -6,7 +6,8 @@ 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 select, pairs, print = select, pairs, print
|
||||
local pairs, print, unpack = pairs, print, unpack
|
||||
local getn = table.getn
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
@@ -14,16 +15,16 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
local function Control_OnEnter()
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
local function Control_OnLeave()
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function Button_OnClick(frame, button)
|
||||
frame.obj:Fire("OnClick", button)
|
||||
local function Button_OnClick()
|
||||
this.obj:Fire("OnClick", arg1)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
@@ -58,9 +59,9 @@ local methods = {
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
local n = select("#", ...)
|
||||
local n = getn(arg)
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(...)
|
||||
image:SetTexCoord(unpack(arg))
|
||||
else
|
||||
image:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user