comparison Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua @ 17:3000eccbf1a0 v7.3.0.017

- ToC Update.
author Tercio
date Sat, 02 Sep 2017 14:10:48 -0300
parents fc346da3afd9
children
comparison
equal deleted inserted replaced
16:6c64dd7f16a2 17:3000eccbf1a0
1 --[[----------------------------------------------------------------------------- 1 --[[-----------------------------------------------------------------------------
2 Frame Container 2 Frame Container
3 -------------------------------------------------------------------------------]] 3 -------------------------------------------------------------------------------]]
4 local Type, Version = "Frame", 24 4 local Type, Version = "Frame", 26
5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) 5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
6 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end 6 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
7 7
8 -- Lua APIs 8 -- Lua APIs
9 local pairs, assert, type = pairs, assert, type 9 local pairs, assert, type = pairs, assert, type
19 19
20 --[[----------------------------------------------------------------------------- 20 --[[-----------------------------------------------------------------------------
21 Scripts 21 Scripts
22 -------------------------------------------------------------------------------]] 22 -------------------------------------------------------------------------------]]
23 local function Button_OnClick(frame) 23 local function Button_OnClick(frame)
24 PlaySound("gsTitleOptionExit") 24 PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
25 frame.obj:Hide() 25 frame.obj:Hide()
26 end
27
28 local function Frame_OnShow(frame)
29 frame.obj:Fire("OnShow")
26 end 30 end
27 31
28 local function Frame_OnClose(frame) 32 local function Frame_OnClose(frame)
29 frame.obj:Fire("OnClose") 33 frame.obj:Fire("OnClose")
30 end 34 end
184 frame:SetFrameStrata("FULLSCREEN_DIALOG") 188 frame:SetFrameStrata("FULLSCREEN_DIALOG")
185 frame:SetBackdrop(FrameBackdrop) 189 frame:SetBackdrop(FrameBackdrop)
186 frame:SetBackdropColor(0, 0, 0, 1) 190 frame:SetBackdropColor(0, 0, 0, 1)
187 frame:SetMinResize(400, 200) 191 frame:SetMinResize(400, 200)
188 frame:SetToplevel(true) 192 frame:SetToplevel(true)
193 frame:SetScript("OnShow", Frame_OnShow)
189 frame:SetScript("OnHide", Frame_OnClose) 194 frame:SetScript("OnHide", Frame_OnClose)
190 frame:SetScript("OnMouseDown", Frame_OnMouseDown) 195 frame:SetScript("OnMouseDown", Frame_OnMouseDown)
191 196
192 local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate") 197 local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
193 closebutton:SetScript("OnClick", Button_OnClick) 198 closebutton:SetScript("OnClick", Button_OnClick)