# HG changeset patch
# User Nenue
# Date 1477348120 14400
# Node ID 6e2cb847c3c6cb14a071a1799a9f2b80f5e8b074
# Parent 74e714637d6a3e3ec9eed182d9783ce5a82235d3
Implement a mixin template for the basic visual config widgets.
diff -r 74e714637d6a -r 6e2cb847c3c6 Modules/BuffFrame.lua
--- a/Modules/BuffFrame.lua Fri Oct 21 18:03:35 2016 -0400
+++ b/Modules/BuffFrame.lua Mon Oct 24 18:28:40 2016 -0400
@@ -11,6 +11,7 @@
- BuffButtons can only be hidden/shown by blizzcode, so functions doing that have to be accounted for
--]]
+
local BUFFS_PER_ROW = 12
local BUFF_BUTTON_SIZE = 48
local BUFF_BUTTON_SPACING_H = 5
@@ -40,10 +41,15 @@
VeneerBuffFrameMixin = {
moduleName = 'Buff Frames',
defaultCluster = 'TOPRIGHT',
+ anchorX = BUFF_FRAMES_X,
+ anchorY = BUFF_FRAMES_Y,
+ anchorPoint = 'TOPRIGHT',
Buttons = {},
DetectedFrames = {},
AuraCache = {}
}
+VeneerBuffFrameButtonMixin = {
+}
local plugin = VeneerBuffFrameMixin
local vn = Veneer
@@ -116,7 +122,61 @@
CENTER = {0, 0},
}
-function plugin:Acquire(target)
+-- Associates skinning elements with said button
+local surrogates = {
+ ['Show'] = false,
+ ['Hide'] = false,
+ ['SetText'] = false,
+ ['SetVertexColor'] = function(self, region, r, g, b, a)
+ if not self.progress then
+ return
+ end
+
+ region:Hide()
+ tprint('|cFF0088FFborder:SetVertexColor|r', r,g,b,a)
+ self.progress.fg:SetColorTexture(r,g,b,a)
+ self.border:SetColorTexture(r,g,b,a)
+ self.border:Show()
+ end,
+}
+local DoRegionHooks = function (veneer, region)
+
+ if region then
+ --print('hooking', region:GetName())
+ region:ClearAllPoints()
+ for method, callback in pairs(surrogates) do
+ if type(region[method]) == 'function' then
+
+ --print(method, type(callback))
+ local func
+ if callback then
+ hooksecurefunc(region, method, function(self, ...)
+ --tprint('|cFF00FFFF'.. region:GetName().. ':', method)
+ region:ClearAllPoints()
+ callback(veneer, region, ...)
+ end)
+ else
+ hooksecurefunc(region, method, function(self,...)
+ tprint('|cFF0088FF'.. self:GetName().. ':', method)
+ self:ClearAllPoints()
+ veneer:Show()
+ veneer[method](veneer, ...)
+
+ if self:GetName():match('Debuff.+Count') then
+
+ print('|cFF00FFFF'.. self:GetName().. ':'.. method, '->', veneer:GetName()..':'..method..'(', ...,')')
+ print(veneer:IsVisible(),veneer:GetStringWidth(),veneer:GetText())
+ print(veneer:GetTop(), veneer:GetLeft())
+ print(veneer:GetPoint(1))
+ end
+
+ end)
+ end
+ end
+ end
+ end
+end
+function VeneerBuffFrameMixin:Acquire(target)
local frame = self.Buttons[target]
if not (self.Buttons[target]) then
@@ -173,11 +233,11 @@
return frame
end
-function plugin:OnLoad()
+function VeneerBuffFrameMixin:OnLoad()
Veneer:AddHandler(self, self.defaultCluster)
end
-function plugin:Setup()
+function VeneerBuffFrameMixin:Setup()
hooksecurefunc("BuffFrame_Update", function(...) self:OnBuffFrameUpdate(...) end)
@@ -190,68 +250,9 @@
_G['TempEnchant'..i..'Border']:SetVertexColor(0.5,0,1,1)
end
end
--- Associates skinning elements with said button
-local surrogates = {
- ['Show'] = false,
- ['Hide'] = false,
- ['SetText'] = false,
- ['SetVertexColor'] = function(self, region, r, g, b, a)
- if not self.progress then
- return
- end
- region:Hide()
- tprint('|cFF0088FFborder:SetVertexColor|r', r,g,b,a)
- self.progress.fg:SetColorTexture(r,g,b,a)
- self.border:SetColorTexture(r,g,b,a)
- self.border:Show()
- end,
-}
-local DoRegionHooks = function (veneer, region)
- if region then
- --print('hooking', region:GetName())
- region:ClearAllPoints()
- for method, callback in pairs(surrogates) do
- if type(region[method]) == 'function' then
-
- --print(method, type(callback))
- local func
- if callback then
- func = function(self, ...)
- --tprint('|cFF00FFFF'.. region:GetName().. ':', method)
- region:ClearAllPoints()
- callback(veneer, region, ...)
- end
- else
- func = function(self,...)
- tprint('|cFF0088FF'.. self:GetName().. ':', method)
- self:ClearAllPoints()
- veneer:Show()
- veneer[method](veneer, ...)
-
- if self:GetName():match('Debuff.+Count') then
-
- print('|cFF00FFFF'.. self:GetName().. ':'.. method, '->', veneer:GetName()..':'..method..'(', ...,')')
- print(veneer:IsVisible(),veneer:GetStringWidth(),veneer:GetText())
- print(veneer:GetTop(), veneer:GetLeft())
- print(veneer:GetPoint(1))
- end
-
- end
- end
- if func then
- --print('hooking', region:GetName(), method)
- hooksecurefunc(region, method, func)
-
- end
- end
- end
- end
-end
-
-
-function plugin:SetupButton (name)
+function VeneerBuffFrameMixin:SetupButton (name)
local frame = _G[name ]
if self.DetectedFrames[frame] then
--print('|cFFFF4400Attempting to skin a frame that already went through.|r')
@@ -320,7 +321,7 @@
--- Set widgets to reflect the passed parameters
-function plugin:UpdateButton (frame, duration, expires)
+function VeneerBuffFrameMixin:UpdateButton (frame, duration, expires)
local veneer = self:Acquire(frame)
-- is it a new button?
if not self.DetectedFrames[frame] then
@@ -374,9 +375,10 @@
veneer.cooldown:Hide()
end
- if count and count >= 1 then
+ if count and count > 1 then
veneer.count:SetText(count)
veneer.count:Show()
+ frame.count:ClearAllPoints()
else
veneer.count:Hide()
end
@@ -393,7 +395,7 @@
--- Provides the number of changed indices for use in deciding between partial and full veneer updates
-function plugin:ButtonHasChanged (frame, ...)
+function VeneerBuffFrameMixin:ButtonHasChanged (frame, ...)
aurasCache[frame] = aurasCache[frame] or {}
local hasChange = 0
local numVals = select('#',...)
@@ -407,7 +409,7 @@
return hasChange
end
-function plugin:OnAuraButton_Update (name, index, filter)
+function VeneerBuffFrameMixin:OnAuraButton_Update (name, index, filter)
local bName = name..index
local frame = _G[bName]
if frame and frame:IsVisible() then
@@ -423,7 +425,7 @@
end
end
-function plugin:OnUpdateAllBuffAnchors ()
+function VeneerBuffFrameMixin:OnUpdateAllBuffAnchors ()
local todo = {}
if #pendingFrames >= 1 then
@@ -446,6 +448,8 @@
local lastBuff, topBuff
local numBuffs = 0
+ local numColumns = 1
+ local maxColumn = 1
for i = 1, BUFF_ACTUAL_DISPLAY do
local buff = _G['BuffButton'..i]
if buff then
@@ -454,13 +458,19 @@
if mod(numBuffs,BUFFS_PER_ROW) == 1 then
if numBuffs == 1 then
buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
- plugin.currentTop = buff:GetTop()
+ plugin.currentTop = buff
else
buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V)
end
+ numColumns = 1
topBuff = buff
else
buff:SetPoint('TOPRIGHT', lastBuff, 'TOPLEFT', -BUFF_BUTTON_SPACING_H, 0)
+ numColumns = numColumns + 1
+ end
+ if numColumns > maxColumn then
+ maxColumn = numColumns
+ plugin.currentLeft = buff
end
lastBuff = buff
end
@@ -489,11 +499,18 @@
end
if lastBuff then
- plugin.currentBottom = lastBuff:GetBottom()
+ plugin.currentBottom = lastBuff
end
+
+ self.Background:ClearAllPoints()
+ self.Background:SetPoint('TOPRIGHT', plugin.currentTop, 'TOPRIGHT', 4, 4)
+ self.Background:SetPoint('BOTTOM', plugin.currentBottom, 'BOTTOM', 0, -4)
+ self.Background:SetPoint('LEFT', plugin.currentLeft, 'LEFT', -4, 0)
end
-
-function plugin:OnUpdateDuration (frame, timeLeft)
+function VeneerBuffFrameMixin:UpdateConfigLayers (configMode)
+ self:SetShown(configMode)
+end
+function VeneerBuffFrameMixin:OnUpdateDuration (frame, timeLeft)
local veneer = self:Acquire(frame)
local hours = floor(timeLeft/3600)
local minutes = floor(mod(timeLeft, 3600)/60)
@@ -527,7 +544,7 @@
-- Obtains the first instance of Tenchant use
-function plugin:OnTemporaryEnchantFrameUpdate (...)
+function VeneerBuffFrameMixin:OnTemporaryEnchantFrameUpdate (...)
local numVals = select('#', ...)
local numItems = numVals / 4
if numItems >= 1 then
@@ -558,9 +575,24 @@
end
end
-function plugin:OnBuffFrameUpdate ()
+function VeneerBuffFrameMixin:OnBuffFrameUpdate ()
end
+function VeneerBuffFrameButtonMixin:OnLoad()
+
+ self.duration = self.progress.duration
+ self.count = self.overlay.count
+ self.border = self.underlay.bg
+
+ VeneerBuffFrame.ConfigLayers = VeneerBuffFrame.ConfigLayers or {}
+ self.configIndex = #VeneerBuffFrame.ConfigLayers
+ for i, region in ipairs(self.ConfigLayers) do
+ tinsert(VeneerBuffFrame.ConfigLayers, region)
+ end
+
+ self.configIndexEnd = #VeneerBuffFrame.ConfigLayers
+end
+
-- The TempEnchant frames are hardcoded in the base FrameXML, so get them now
diff -r 74e714637d6a -r 6e2cb847c3c6 Modules/BuffFrame.xml
--- a/Modules/BuffFrame.xml Fri Oct 21 18:03:35 2016 -0400
+++ b/Modules/BuffFrame.xml Mon Oct 24 18:28:40 2016 -0400
@@ -2,14 +2,13 @@
..\FrameXML\UI.xsd">
-
-
+
+
+
+
+
-
- self.duration = self.progress.duration
- self.count = self.overlay.count
- self.border = self.underlay.bg
-
+
+
+
+
+
+
+
+ VeneerAnimationMixin.OnPlay(self)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if self.OnShow then self:OnShow() end
+ if self.Header:IsVisible() then
+ self.ProgressBG:ClearAllPoints()
+ self.ProgressBG:SetPoint('TOP', self.GlowLine, 'BOTTOM', 0, -1)
+ self.ProgressBG:SetPoint('LEFT')
+ self.ProgressBG:SetPoint('RIGHT')
+ self.ProgressBG:SetPoint('BOTTOM')
+ else
+ self.ProgressBG:ClearAllPoints()
+ self.ProgressBG:SetAllPoints(self)
+ end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 74e714637d6a -r 6e2cb847c3c6 Veneer.lua
--- a/Veneer.lua Fri Oct 21 18:03:35 2016 -0400
+++ b/Veneer.lua Mon Oct 24 18:28:40 2016 -0400
@@ -7,8 +7,16 @@
SLASH_VENEER1 = "/veneer"
SLASH_VENEER2 = "/vn"
+local VENEER_VERSION = 703
SlashCmdList.VENEER = function(cmd)
+
+ if Veneer.ConfigMode then
+ Veneer.ConfigMode = false
+ else
+ Veneer.ConfigMode = true
+ end
+ Veneer:UpdateConfigLayers()
end
VeneerCore = {
@@ -17,20 +25,8 @@
FrameClusters = {},
parserDepth = 0,
pendingCalls = {},
+ AddOnCheck = {}
}
-VeneerHandlerMixin = {
-
- anchorPoint = 'CENTER', -- indicates the initial cluster group point
- --anchorPath = 'BOTTOM', -- indicates the point from which the frame is anchored in a cluster arrangement
- OnHide = function()
- Veneer:DynamicReanchor()
- end,
- OnShow = function(self)
- self:Reanchor()
- Veneer:StaticReanchor(self)
- end
-}
-VeneerAnimationMixin = {}
local print = DEVIAN_WORKSPACE and function(...) print('Veneer', ...) end or nop
local wipe = table.wipe
@@ -42,7 +38,8 @@
BuffFrame = {
width = 48,
height = 48,
- }
+ },
+ ConfigMode = true
}
local configMode
@@ -109,14 +106,36 @@
end
+local select, IsAddOnLoaded, IsLoggedIn = select, IsAddOnLoaded, IsLoggedIn
+
function VeneerCore:OnEvent(event, ...)
+ print(event, ...)
if event == 'ADDON_LOADED' or event == 'PLAYER_LOGIN' then
+ print(IsLoggedIn(), self.initialized)
if IsLoggedIn() and not self.intialized then
self:Setup()
- self:UnregisterEvent('ADDON_LOADED')
- self:UnregisterEvent('PLAYER_LOGIN')
- self:Reanchor()
- self:Update()
+ self.intialized = true
+ print('popping init sequence', self.intialized)
+ end
+
+
+ if self.intialized then
+ local addon = ...
+ if self.AddOnCheck[addon] then
+ print(' - setting up '..addon..' dependent modules:')
+ local keepChecking = false
+ for index, handler in ipairs(self.AddOnCheck[addon]) do
+ print(' -', handler:GetName(), (not handler.initialized) and (handler.addonFrame and not _G[handler.addonFrame]))
+ if not handler.initialized then
+ print(' '..handler:GetName()..':Setup()')
+ handler:Setup()
+ handler.initialized = true
+ end
+ end
+ if not keepChecking then
+ self.AddOnCheck[addon] = nil
+ end
+ end
end
end
end
@@ -130,18 +149,71 @@
end
function VeneerCore:Setup ()
- self.initialized = true
- if (not VeneerData) or (not VeneerData.version) then
+ local resetConfig = (not VeneerData)
+ if (not VeneerData) then
VeneerData = defaults
+ VeneerData.version = VENEER_VERSION
+ self:print('Fresh install.')
+ elseif (VeneerData.version and VeneerData.version < VENEER_VERSION) then
+ local oldVars = VeneerData
+ VeneerData = defaults
+ VeneerData.version = VENEER_VERSION
+ VeneerData.oldSettings = oldVars
+ self:print('Resetting to temp defaults. Use /vn retro to use old settings.')
end
self.data = VeneerData
- self:ExecuteOnClusters(nil, 'Setup')
+ self:ExecuteOnClusters(nil, function(frame)
+ if (not frame.addonTrigger) or select(2,IsAddOnLoaded(frame.addonTrigger)) then
+ if not frame.initialized then
+ frame:Setup()
+ frame.initialized = true
+ end
+ end
+ end)
+
+ self.ConfigMode = VeneerData.ConfigMode
+ self:UpdateConfigLayers()
+ self:Reanchor()
+ self:Update()
end
+function VeneerCore:UpdateConfigLayers()
+ if VeneerData then
+
+ VeneerData.ConfigMode = self.ConfigMode
+ end
+
+ self:print('Config mode '..(self.ConfigMode and '|cFF00FF00ON|r' or '|cFFFF0000OFF|r')..'.')
+ self:ExecuteOnClusters(nil, function(frame)
+ if frame.UpdateConfigLayers then
+ frame:UpdateConfigLayers(self.ConfigMode)
+ end
+
+
+ if type(frame.ConfigLayer) == 'table' then
+ for index, region in ipairs(frame.ConfigLayer) do
+ print('setting', frame:GetName() .. '['.. index..']', 'to', self.ConfigMode)
+
+ region:SetShown(self.ConfigMode)
+ end
+ end
+
+ self.ConfigLayers[frame] = frame:IsShown()
+ if self.ConfigMode then
+ print(frame:GetName(), self.ConfigLayers[frame])
+ frame:SetShown(self.ConfigMode)
+ else
+ frame:SetShown(self.ConfigLayers[frame])
+ end
+ end)
+end
function VeneerCore:GetClusterFromArgs (...)
local primaryAnchor
local insertPosition
+
+
+
local clusterTable = self.FrameClusters
for i = 1, select('#', ...) do
local arg = select(i, ...)
@@ -169,13 +241,15 @@
function VeneerCore:AddHandler(handler, ...)
print('*** Adding handler:', handler.moduleName or handler:GetName())
- local anchorGroup, clusterTable, clusterIndex = self:GetClusterFromArgs(...)
- if clusterIndex == 1 then
- for i, frame in ipairs(clusterTable) do
- frame.clusterIndex = i + 1
+
+ local anchorGroup, clusterTable, clusterIndex = self:GetClusterFromArgs(...)
+ if clusterIndex == 1 then
+ for i, frame in ipairs(clusterTable) do
+ frame.clusterIndex = i + 1
+ end
end
- end
- tinsert(clusterTable, clusterIndex, handler)
+ tinsert(clusterTable, clusterIndex, handler)
+
print('cluster', anchorGroup, 'table', clusterTable, 'position', clusterIndex)
handler.anchorCluster = clusterTable
@@ -186,13 +260,28 @@
handler[k] = v
end
end
+
+ if handler.addonTrigger and not IsAddOnLoaded(handler.addonTrigger) then
+ print('|cFFFF4400 -- dependency:', handler.addonTrigger)
+ self.AddOnCheck[handler.addonTrigger] = self.AddOnCheck[handler.addonTrigger] or {}
+ tinsert(self.AddOnCheck[handler.addonTrigger], handler)
+ end
+
if self.initialized then
- print(' -- doing initialization')
- if handler.Setup and not handler.initialized then
- handler:Setup()
- handler.initialized = true
+ print(' -- initialization check')
+ if handler.Setup then
+ local doInit = (not handler.initialized)
+ if handler.addonTrigger and not IsAddOnLoaded(handler.addonTrigger) then
+ doInit = false
+ end
+ -- room to add other checks
+
+ if doInit then
+ handler:Setup()
+ handler.initialized = true
+ self:InternalReanchor(handler)
+ end
end
- self:InternalReanchor(handler)
end
end
@@ -202,7 +291,11 @@
end
function VeneerCore:Update()
- self:ExecuteOnClusters(nil, 'Update')
+ self:ExecuteOnClusters(nil, function(frame)
+ if frame.initialized and frame.Update then
+ frame:Update()
+ end
+ end)
self:Reanchor()
end
@@ -219,16 +312,24 @@
for anchorPoint, cluster in pairs(parent.FrameClusters) do
local lastFrame
for index, frame in ipairs(cluster) do
- print(' |cFF00FF00'..index, frame:GetName(), frame:IsVisible())
+ print(' |cFF00FF00'..index, frame:GetName(), frame:IsVisible(), (lastFrame and ('|cFFFFFF00'..lastFrame:GetName()..'|r') or '|cFF00FFFFUIParent'))
if frame:IsVisible() then
- anchorPoint = frame.anchorPoint
- frame:ClearAllPoints()
- if lastFrame then
- frame:SetPoint(anchorPoint, lastFrame, ANCHOR_OFFSET_POINT[anchorPoint], 0, 0)
+
+ if frame.anchorFrame then
+ frame:SetPoint(frame.anchorPoint, frame.anchorFrame, frame.anchorFrom, frame.anchorX, frame.anchorY)
+ print(frame:GetTop(), frame:GetRight())
else
- frame:SetPoint(anchorPoint, UIParent, anchorPoint, 0, 0)
+ anchorPoint = frame.anchorPoint
+ frame:ClearAllPoints()
+ if lastFrame then
+ frame:SetPoint(anchorPoint, lastFrame, ANCHOR_OFFSET_POINT[anchorPoint], 0, 0)
+ else
+ frame:SetPoint(anchorPoint, UIParent, anchorPoint, frame.anchorX, frame.anchorY)
+ end
+ print(frame:GetTop(), frame:GetRight())
+ lastFrame = frame
end
- lastFrame = frame
+
end
end
@@ -238,6 +339,12 @@
-- Evaluates the current visibility state and re-anchors adjacent blocks accordingly
function VeneerCore:InternalReanchor(handler, printFunc)
print('|cFF00FFFFVeneer:InternalReanchor('..handler:GetName()..')')
+ if handler.anchorFrame then
+ handler:SetPoint(handler.anchorPoint, handler.anchorFrame, handler.anchorFrom, handler.anchorX, handler.anchorY)
+ return
+ end
+
+
local anchorPoint = handler.anchorPath or handler.anchorPoint
local anchorParent, anchorTo = UIParent, anchorPoint
local subPoint, subTo
@@ -304,7 +411,7 @@
print('delaying walk for', method)
return
end
- print('|cFF00FF00Veneer:ExecuteOnClusters|r('..tostring(layer)..', '..method..')')
+ print('|cFF00FF00Veneer:ExecuteOnClusters|r('..tostring(layer)..', '..tostring(method)..')')
else
print(' Level '..self.parserDepth)
end
@@ -313,7 +420,9 @@
for anchor, cluster in pairs(layer) do
for index, frame in ipairs(cluster) do
print(' '..anchor..'.'..index..' = '..frame:GetName())
- if frame[method] then
+ if type(method) == 'function' then
+ method(frame, true)
+ elseif frame[method] then
print(' |cFF00FF00'..frame:GetName())
frame[method](frame, true)
end
@@ -331,102 +440,7 @@
end
end
-local VeneerButton_OnDragStart = function(self)
- self.startingLeft = self:GetLeft()
- self.startingBottom = self:GetBottom()
- self.anchors = self.anchors or {}
- table.wipe(self.anchors)
- local frame = self:GetParent()
- local n = frame:GetNumPoints()
- for i = 1, n do
- local anchor, parent, relative, x, y = frame:GetPoint(i)
- self.anchors[i] = {
- anchor = anchor,
- parent = parent,
- relative = relative,
- x = x,
- y = y
- }
- end
-
- print(self:GetName(), 'start moving', self.startingLeft, self.startingBottom)
- self:StartMoving()
-end
-
-local VeneerButton_OnDragStop = function(self)
- self:StopMovingOrSizing()
- if self.OnDragStop then
- self.OnDragStop(self)
- else
- local frame = self:GetParent()
- local dx = self:GetLeft() - self.startingLeft
- local dy = self:GetBottom() - self.startingBottom
-
- frame:ClearAllPoints()
- for i, point in ipairs(self.anchors) do
- frame:SetPoint(point.anchor, point.parent, point.relative, point.x + dx, point.y + dy)
- print('adjusting anchor', point.anchor, point.parent, point.relative, point.x + dx, point.y + dy)
- end
- end
-end
-
-local Veneer_FixMovers = function()
- for frame, veneer in pairs(veneers) do
- if veneer:IsMoving() then
- VeneerButton_OnDragStop(veneer)
- end
- end
-end
-
-local VeneerButton_Update = function(self)
- if configMode then
- self:SetScript('OnDragStart', VeneerButton_OnDragStart)
- self:SetScript('OnDragStop', VeneerButton_OnDragStop)
- self:SetMovable(true)
- self:EnableMouse(true)
- self:RegisterForDrag('LeftButton')
-
- self.bg:SetColorTexture(0,1,0,0.5)
- for i, region in ipairs(self.configLayers) do
- region:Show()
- end
- self:Show()
- else
-
- self:SetScript('OnDragStart', self.StartMoving)
- self:SetScript('OnDragStop', self.StopMovingOrSizing)
- self:SetMovable(false)
- self:EnableMouse(false)
-
- self.bg:SetColorTexture(0,1,0,0)
- for i, region in ipairs(self.configLayers) do
- region:Hide()
- end
- if self.isHidden then
- self:Hide()
- end
-
- end
-end
-
-local ToggleVeneerConfig = function()
- if configMode then
- configMode = false
- Veneer:print('Config mode off.')
- else
- configMode = true
- Veneer:print('Config mode on.')
- end
-
- for frame, veneer in pairs(veneers) do
- VeneerButton_Update(veneer)
- end
-end
-
-local VeneerButton_OnShow = function(self)
- VeneerButton_Update(self)
-end
-- Takes frame handle and assigns a block to it
function VeneerCore:Acquire (frame, template)
@@ -437,8 +451,8 @@
local veneer = self.Frames[frame]
if not veneer then
local name = type(frame) == 'table' and GetTableName(frame) or GetAnonymousName()
- veneer = CreateFrame('Frame', name, frame, template or 'VeneerTemplate')
- print('+veneer', name)
+ veneer = CreateFrame('Frame', name, frame, template or 'VeneerStatusButtonTemplate')
+ print(self:GetName()..':Acquire()', frame:GetName(), template)
veneer:SetAllPoints(frame)
veneer:SetParent(frame)
@@ -446,37 +460,10 @@
veneer.bg:SetColorTexture(0,0,0,0)
veneer:Hide()
veneer:EnableMouse(false)
-
- veneer:SetScript('OnShow', VeneerButton_OnShow)
-
-- find current X/Y
veneer.currentLeft = frame:GetLeft()
veneer.currentTop = frame:GetTop()
self.Frames[frame] = veneer
end
-
return veneer
-end
-
-function VeneerHandlerMixin:Reanchor (anchorAll)
- if not anchorAll then
- Veneer:InternalReanchor(self)
- end
-
-end
-
-function VeneerAnimationMixin:OnPlay()
- PlaySoundKitID(229)
- self.animating = true
- print('|cFF00FF00Anim:OnPlay|r @', unpack(self.sourcePoint))
-end
-function VeneerAnimationMixin:OnStop()
- PlaySoundKitID(229)
- self.animating = nil
- print('|cFF00FF00Anim:OnFinish|r @', unpack(self.destPoint))
-end
-function VeneerAnimationMixin:OnFinished()
- PlaySoundKitID(229)
- self.animating = nil
- print('|cFF00FF00Anim:OnFinish|r @', unpack(self.destPoint))
end
\ No newline at end of file
diff -r 74e714637d6a -r 6e2cb847c3c6 Veneer.toc
--- a/Veneer.toc Fri Oct 21 18:03:35 2016 -0400
+++ b/Veneer.toc Mon Oct 24 18:28:40 2016 -0400
@@ -13,4 +13,5 @@
##Options.lua
##Modules\PaperDoll.lua
Modules\WorldState.xml
+Modules\TalkingHead.xml
Modules\BuffFrame.xml
\ No newline at end of file
diff -r 74e714637d6a -r 6e2cb847c3c6 Veneer.xml
--- a/Veneer.xml Fri Oct 21 18:03:35 2016 -0400
+++ b/Veneer.xml Mon Oct 24 18:28:40 2016 -0400
@@ -2,45 +2,13 @@
..\FrameXML\UI.xsd">
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VeneerAnimationMixin.OnPlay(self)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -111,101 +79,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if self.OnShow then self:OnShow() end
- if self.Header:IsVisible() then
- self.ProgressBG:ClearAllPoints()
- self.ProgressBG:SetPoint('TOP', self.GlowLine, 'BOTTOM', 0, -1)
- self.ProgressBG:SetPoint('LEFT')
- self.ProgressBG:SetPoint('RIGHT')
- self.ProgressBG:SetPoint('BOTTOM')
- else
- self.ProgressBG:ClearAllPoints()
- self.ProgressBG:SetAllPoints(self)
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file