Mercurial > wow > askmrrobot
comparison Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua @ 106:e635cd648e01 v49
7.2 update
| author | yellowfive |
|---|---|
| date | Tue, 28 Mar 2017 16:10:00 -0700 |
| parents | 01b63b8ed811 |
| children | e31b02b24488 |
comparison
equal
deleted
inserted
replaced
| 105:3ce266c86bd3 | 106:e635cd648e01 |
|---|---|
| 1 --[[----------------------------------------------------------------------------- | 1 --[[----------------------------------------------------------------------------- |
| 2 Frame Container | 2 Frame Container |
| 3 -------------------------------------------------------------------------------]] | 3 -------------------------------------------------------------------------------]] |
| 4 local Type, Version = "Frame", 24 | 4 local Type, Version = "Frame", 25 |
| 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 |
| 21 Scripts | 21 Scripts |
| 22 -------------------------------------------------------------------------------]] | 22 -------------------------------------------------------------------------------]] |
| 23 local function Button_OnClick(frame) | 23 local function Button_OnClick(frame) |
| 24 PlaySound("gsTitleOptionExit") | 24 PlaySound("gsTitleOptionExit") |
| 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) |
