Mercurial > wow > askmrrobot
comparison Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.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 |
|---|---|
| 10 local pairs = pairs | 10 local pairs = pairs |
| 11 | 11 |
| 12 -- WoW APIs | 12 -- WoW APIs |
| 13 local _G = _G | 13 local _G = _G |
| 14 local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent | 14 local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent |
| 15 | |
| 16 local wowMoP | |
| 17 do | |
| 18 local _, _, _, interface = GetBuildInfo() | |
| 19 wowMoP = (interface >= 50000) | |
| 20 end | |
| 21 | 15 |
| 22 --[[----------------------------------------------------------------------------- | 16 --[[----------------------------------------------------------------------------- |
| 23 Scripts | 17 Scripts |
| 24 -------------------------------------------------------------------------------]] | 18 -------------------------------------------------------------------------------]] |
| 25 local function Button_OnClick(frame, ...) | 19 local function Button_OnClick(frame, ...) |
| 78 --[[----------------------------------------------------------------------------- | 72 --[[----------------------------------------------------------------------------- |
| 79 Constructor | 73 Constructor |
| 80 -------------------------------------------------------------------------------]] | 74 -------------------------------------------------------------------------------]] |
| 81 local function Constructor() | 75 local function Constructor() |
| 82 local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type) | 76 local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type) |
| 83 local frame = CreateFrame("Button", name, UIParent, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2") | 77 local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate") |
| 84 frame:Hide() | 78 frame:Hide() |
| 85 | 79 |
| 86 frame:EnableMouse(true) | 80 frame:EnableMouse(true) |
| 87 frame:SetScript("OnClick", Button_OnClick) | 81 frame:SetScript("OnClick", Button_OnClick) |
| 88 frame:SetScript("OnEnter", Control_OnEnter) | 82 frame:SetScript("OnEnter", Control_OnEnter) |
