Commit ea236679 authored by nevcairiel's avatar nevcairiel
Browse files

AceGUI-3.0: UIPanelButtonTemplate2 -> UIPanelButtonTemplate for WoW 5.0

git-svn-id: https://repos.wowace.com/wow/ace3/trunk@1051 5debad98-a965-4143-8383-f471b3509dcf
parent d410a4d9
......@@ -2,7 +2,7 @@
Button Widget
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "Button", 21
local Type, Version = "Button", 22
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -13,6 +13,12 @@ local pairs = pairs
local _G = _G
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
......@@ -63,7 +69,7 @@ Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate2")
local frame = CreateFrame("Button", name, UIParent, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
frame:Hide()
frame:EnableMouse(true)
......
......@@ -2,7 +2,7 @@
Keybinding Widget
Set Keybindings in the Config UI.
-------------------------------------------------------------------------------]]
local Type, Version = "Keybinding", 22
local Type, Version = "Keybinding", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -17,6 +17,12 @@ local CreateFrame, UIParent = CreateFrame, UIParent
-- List them here for Mikk's FindGlobals script
-- GLOBALS: NOT_BOUND
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
......@@ -174,7 +180,7 @@ local function Constructor()
local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Frame", nil, UIParent)
local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate2")
local button = CreateFrame("Button", name, frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
button:EnableMouse(true)
button:RegisterForClicks("AnyDown")
......
local Type, Version = "MultiLineEditBox", 26
local Type, Version = "MultiLineEditBox", 27
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -14,6 +14,12 @@ local _G = _G
-- List them here for Mikk's FindGlobals script
-- GLOBALS: ACCEPT, ChatFontNormal
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
......@@ -279,7 +285,7 @@ local function Constructor()
label:SetText(ACCEPT)
label:SetHeight(10)
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate2")
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
button:SetPoint("BOTTOMLEFT", 0, 4)
button:SetHeight(22)
button:SetWidth(label:GetStringWidth() + 24)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment