from retail
This commit is contained in:
@@ -4,7 +4,7 @@ local tinsert, tconcat, tremove, wipe = table.insert, table.concat, table.remove
|
||||
local select, pairs, next, type, unpack = select, pairs, next, type, unpack
|
||||
local tostring, error = tostring, error
|
||||
|
||||
local Type, Version = "WeakAurasDisplayButton", 53
|
||||
local Type, Version = "WeakAurasDisplayButton", 54
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
@@ -1670,7 +1670,7 @@ local methods = {
|
||||
return self.frame:IsEnabled();
|
||||
end,
|
||||
["OnRelease"] = function(self)
|
||||
self:ReleaseThumnail()
|
||||
self:ReleaseThumbnail()
|
||||
self:SetViewRegion();
|
||||
self:Enable();
|
||||
self:SetGroup();
|
||||
@@ -1695,8 +1695,8 @@ local methods = {
|
||||
end
|
||||
|
||||
if self.data.regionType ~= self.thumbnailType then
|
||||
self:ReleaseThumnail()
|
||||
self:AcquireThumnail()
|
||||
self:ReleaseThumbnail()
|
||||
self:AcquireThumbnail()
|
||||
else
|
||||
local option = WeakAuras.regionOptions[self.thumbnailType]
|
||||
if option and option.modifyThumbnail then
|
||||
@@ -1704,7 +1704,7 @@ local methods = {
|
||||
end
|
||||
end
|
||||
end,
|
||||
["ReleaseThumnail"] = function(self)
|
||||
["ReleaseThumbnail"] = function(self)
|
||||
if not self.hasThumbnail then
|
||||
return
|
||||
end
|
||||
@@ -1717,7 +1717,7 @@ local methods = {
|
||||
self.thumbnail = nil
|
||||
end
|
||||
end,
|
||||
["AcquireThumnail"] = function(self)
|
||||
["AcquireThumbnail"] = function(self)
|
||||
if self.hasThumbnail then
|
||||
return
|
||||
end
|
||||
@@ -2044,9 +2044,9 @@ local function Constructor()
|
||||
-- Update in group icon
|
||||
groupUpdate = CreateFrame("BUTTON", nil, button)
|
||||
button.groupUpdate = groupUpdate
|
||||
local gtex = groupUpdate:CreateTexture(nil, "OVERLAY")
|
||||
gtex:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\wagoupdate_logo.tga]])
|
||||
gtex:SetAllPoints()
|
||||
local gTex = groupUpdate:CreateTexture(nil, "OVERLAY")
|
||||
gTex:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\wagoupdate_logo.tga]])
|
||||
gTex:SetAllPoints()
|
||||
groupUpdate:SetSize(16, 16)
|
||||
groupUpdate:SetPoint("BOTTOM", button, "BOTTOM")
|
||||
groupUpdate:SetPoint("LEFT", icon, "RIGHT", 20, 0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
if not WeakAuras.IsCorrectVersion() then return end
|
||||
|
||||
local Type, Version = "WeakAurasNewButton", 23
|
||||
local Type, Version = "WeakAurasNewButton", 24
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
@@ -39,7 +39,7 @@ local methods = {
|
||||
self.frame:SetScript("OnClick", func);
|
||||
end,
|
||||
["SetIcon"] = function(self, icon)
|
||||
self:ReleaseThumnail()
|
||||
self:ReleaseThumbnail()
|
||||
if(type(icon) == "string" or type(icon) == "number") then
|
||||
self.icon:SetTexture(icon);
|
||||
self.icon:Show();
|
||||
@@ -63,7 +63,7 @@ local methods = {
|
||||
self.thumbnailType = regionType
|
||||
end
|
||||
end,
|
||||
["ReleaseThumnail"] = function(self)
|
||||
["ReleaseThumbnail"] = function(self)
|
||||
if self.thumbnail then
|
||||
local regionData = WeakAuras.regionOptions[self.thumbnailType]
|
||||
if regionData and regionData.releaseThumbnail then
|
||||
@@ -74,7 +74,7 @@ local methods = {
|
||||
self.thumbnailType = nil
|
||||
end,
|
||||
["OnRelease"] = function(self)
|
||||
self:ReleaseThumnail()
|
||||
self:ReleaseThumbnail()
|
||||
if(self.iconRegion and self.iconRegion.Hide) then
|
||||
self.iconRegion:Hide();
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
ToolbarButton Widget, based on AceGUI Button
|
||||
Graphical Button.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "WeakAurasToolbarButton", 3
|
||||
local Type, Version = "WeakAurasToolbarButton", 4
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
@@ -40,7 +40,7 @@ local methods = {
|
||||
self:SetWidth(32)
|
||||
self:SetDisabled(false)
|
||||
self:SetText()
|
||||
self.htex:SetVertexColor(1, 1, 1, 0.1)
|
||||
self.hTex:SetVertexColor(1, 1, 1, 0.1)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
@@ -70,9 +70,9 @@ local methods = {
|
||||
end,
|
||||
["SetStrongHighlight"] = function(self, enable)
|
||||
if enable then
|
||||
self.htex:SetVertexColor(1, 1, 1, 0.3)
|
||||
self.hTex:SetVertexColor(1, 1, 1, 0.3)
|
||||
else
|
||||
self.htex:SetVertexColor(1, 1, 1, 0.1)
|
||||
self.hTex:SetVertexColor(1, 1, 1, 0.1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -105,24 +105,24 @@ local function Constructor()
|
||||
text:SetPoint("BOTTOMRIGHT", -4, 1)
|
||||
text:SetJustifyV("MIDDLE")
|
||||
|
||||
--local ntex = frame:CreateTexture()
|
||||
--ntex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
|
||||
--ntex:SetTexCoord(0, 0.625, 0, 0.6875)
|
||||
--ntex:SetAllPoints()
|
||||
--frame:SetNormalTexture(ntex)
|
||||
--local nTex = frame:CreateTexture()
|
||||
--nTex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
|
||||
--nTex:SetTexCoord(0, 0.625, 0, 0.6875)
|
||||
--nTex:SetAllPoints()
|
||||
--frame:SetNormalTexture(nTex)
|
||||
|
||||
local htex = frame:CreateTexture()
|
||||
htex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
||||
htex:SetVertexColor(1, 1, 1, 0.1)
|
||||
local hTex = frame:CreateTexture()
|
||||
hTex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
||||
hTex:SetVertexColor(1, 1, 1, 0.1)
|
||||
|
||||
htex:SetAllPoints()
|
||||
frame:SetHighlightTexture(htex)
|
||||
hTex:SetAllPoints()
|
||||
frame:SetHighlightTexture(hTex)
|
||||
|
||||
local ptex = frame:CreateTexture()
|
||||
ptex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
||||
ptex:SetVertexColor(1, 1, 1, 0.2)
|
||||
ptex:SetAllPoints()
|
||||
frame:SetPushedTexture(ptex)
|
||||
local pTex = frame:CreateTexture()
|
||||
pTex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
||||
pTex:SetVertexColor(1, 1, 1, 0.2)
|
||||
pTex:SetAllPoints()
|
||||
frame:SetPushedTexture(pTex)
|
||||
|
||||
|
||||
local widget = {
|
||||
@@ -130,7 +130,7 @@ local function Constructor()
|
||||
icon = icon,
|
||||
frame = frame,
|
||||
type = Type,
|
||||
htex = htex
|
||||
hTex = hTex
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
|
||||
Reference in New Issue
Block a user