Mercurial > wow > hotcorners
comparison Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua @ 11:371e14cd2feb
- major fixes with icons not showing correctly.
| author | Tercio |
|---|---|
| date | Thu, 08 Dec 2016 13:01:40 -0200 |
| parents | fc346da3afd9 |
| children | 3000eccbf1a0 |
comparison
equal
deleted
inserted
replaced
| 10:6572ed4edaae | 11:371e14cd2feb |
|---|---|
| 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) |
