Button Widget
Graphical Button.
-------------------------------------------------------------------------------]]
-local Type, Version = "Button", 23
+local Type, Version = "Button", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local _G = _G
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
-local wowMoP
-do
- local _, _, _, interface = GetBuildInfo()
- wowMoP = (interface >= 50000)
-end
-
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame, ...)
AceGUI:ClearFocus()
- PlaySound("igMainMenuOption")
+ PlaySound(PlaySoundKitID and "igMainMenuOption" or 852) -- SOUNDKIT.IG_MAINMENU_OPTION
frame.obj:Fire("OnClick", ...)
end
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
- local frame = CreateFrame("Button", name, UIParent, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
+ local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate")
frame:Hide()
frame:EnableMouse(true)