mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
replace Ace3v with Ace3 ElvUI-TBC version
or easy tracking of code difference
This commit is contained in:
@@ -6,31 +6,28 @@ local Type, Version = "Button", 23
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
local AceCore = LibStub("AceCore-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
|
||||
-- WoW APIs
|
||||
local _G = AceCore._G
|
||||
local _G = _G
|
||||
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
-- arg1 is the button for OnClick event
|
||||
local function Button_OnClick()
|
||||
local function Button_OnClick(frame, ...)
|
||||
AceGUI:ClearFocus()
|
||||
PlaySound("igMainMenuOption")
|
||||
this.obj:Fire("OnClick", 1, arg1)
|
||||
frame.obj:Fire("OnClick", ...)
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
@@ -54,7 +51,7 @@ local methods = {
|
||||
self:SetWidth(self.text:GetStringWidth() + 30)
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
["SetAutoWidth"] = function(self, autoWidth)
|
||||
self.autoWidth = autoWidth
|
||||
if self.autoWidth then
|
||||
|
||||
Reference in New Issue
Block a user