comparison Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua @ 124:e31b02b24488

Updated for 8.0 pre-patch and BfA.
author yellowfive
date Tue, 17 Jul 2018 09:57:39 -0700
parents e635cd648e01
children
comparison
equal deleted inserted replaced
123:7a6364917f86 124:e31b02b24488
1 --[[----------------------------------------------------------------------------- 1 --[[-----------------------------------------------------------------------------
2 Button Widget 2 Button Widget
3 Graphical Button. 3 Graphical Button.
4 -------------------------------------------------------------------------------]] 4 -------------------------------------------------------------------------------]]
5 local Type, Version = "Button", 23 5 local Type, Version = "Button", 24
6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) 6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end 7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
8 8
9 -- Lua APIs 9 -- Lua APIs
10 local pairs = pairs 10 local pairs = pairs
16 --[[----------------------------------------------------------------------------- 16 --[[-----------------------------------------------------------------------------
17 Scripts 17 Scripts
18 -------------------------------------------------------------------------------]] 18 -------------------------------------------------------------------------------]]
19 local function Button_OnClick(frame, ...) 19 local function Button_OnClick(frame, ...)
20 AceGUI:ClearFocus() 20 AceGUI:ClearFocus()
21 PlaySound("igMainMenuOption") 21 PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
22 frame.obj:Fire("OnClick", ...) 22 frame.obj:Fire("OnClick", ...)
23 end 23 end
24 24
25 local function Control_OnEnter(frame) 25 local function Control_OnEnter(frame)
26 frame.obj:Fire("OnEnter") 26 frame.obj:Fire("OnEnter")