annotate Veneer.lua @ 105:3992b41c637e

- Fixed a number of relic data retrieval issues
author Nenue
date Sun, 29 Jan 2017 09:54:14 -0500
parents 8df154a2bfd6
children ff00679a7817
rev   line source
Nenue@88 1 -- Veneer Custom Interface Framework
Nenue@88 2 -- 1. vn OnLoad
Nenue@88 3 -- 2. OnEvent where IsLoggedIn() == true
Nenue@88 4 -- 3. Setup() where (not self.initialized)
Nenue@88 5 -- 4. Update()
Nenue@88 6 -- 5. Reanchor()
Nenue@84 7
Nenue@84 8 SLASH_VENEER1 = "/veneer"
Nenue@84 9 SLASH_VENEER2 = "/vn"
Nenue@90 10 local VENEER_VERSION = 703
Nenue@103 11 local LE_FREE_FRAMES_GROUP = 1
Nenue@93 12 local type, strrep, ipairs, tinsert, tostring, select = type, string.rep, ipairs, tinsert, tostring, select
Nenue@93 13 local pairs, tremove = pairs, tremove
Nenue@84 14
Nenue@84 15 SlashCmdList.VENEER = function(cmd)
Nenue@90 16
Nenue@90 17 if Veneer.ConfigMode then
Nenue@90 18 Veneer.ConfigMode = false
Nenue@90 19 else
Nenue@90 20 Veneer.ConfigMode = true
Nenue@90 21 end
Nenue@90 22 Veneer:UpdateConfigLayers()
Nenue@84 23 end
Nenue@88 24
Nenue@84 25 VeneerCore = {
Nenue@84 26 Frames = {},
Nenue@84 27 ConfigLayers = {},
Nenue@103 28 FrameClusters = {
Nenue@103 29 [LE_FREE_FRAMES_GROUP] = {},
Nenue@103 30 },
Nenue@84 31 parserDepth = 0,
Nenue@84 32 pendingCalls = {},
Nenue@90 33 AddOnCheck = {}
Nenue@84 34 }
Nenue@93 35
Nenue@93 36 local print = DEVIAN_WORKSPACE and function(...) _G.print('Veneer', ...) end or nop
Nenue@80 37 local wipe = table.wipe
Nenue@0 38
Nenue@59 39 local defaults = {
Nenue@59 40 enableAll = true,
Nenue@59 41 enableModule = {
Nenue@59 42 BuffFrame = true,
Nenue@59 43 },
Nenue@59 44 BuffFrame = {
Nenue@59 45 width = 48,
Nenue@59 46 height = 48,
Nenue@90 47 },
Nenue@90 48 ConfigMode = true
Nenue@59 49 }
Nenue@84 50
Nenue@71 51 local configMode
Nenue@79 52 local anonID = 0
Nenue@79 53 local IsFrameHandle = IsFrameHandle
Nenue@79 54 local GetAnonymousName = function(key)
Nenue@79 55 if not key then
Nenue@71 56 anonID = anonID + 1
Nenue@79 57 key = anonID
Nenue@71 58 end
Nenue@79 59 return 'VN' .. key
Nenue@71 60 end
Nenue@79 61 local GetTableName = function(table)
Nenue@79 62 return (IsFrameHandle(table) and table:GetName()) or tostring(table)
Nenue@79 63 end
Nenue@79 64
Nenue@87 65 local OFFSET_PARALLELS = {
Nenue@87 66 TOP = {'LEFT', 'RIGHT', 'SetHeight'},
Nenue@87 67 BOTTOM = {'LEFT', 'RIGHT', 'SetHeight'},
Nenue@87 68 LEFT = {'TOP', 'BOTTOM', 'SetWidth'},
Nenue@87 69 RIGHT = {'TOP', 'BOTTOM', 'SetWidth'},
Nenue@87 70 }
Nenue@87 71 local ANCHOR_OFFSET_POINT = {
Nenue@87 72 TOP = 'BOTTOM',
Nenue@87 73 TOPLEFT = 'BOTTOMRIGHT',
Nenue@87 74 TOPRIGHT = 'BOTTOMLEFT',
Nenue@87 75 LEFT = 'RIGHT',
Nenue@87 76 RIGHT = 'LEFT',
Nenue@87 77 CENTER = 'CENTER',
Nenue@87 78 BOTTOM = 'TOP',
Nenue@87 79 BOTTOMRIGHT = 'TOPLEFT',
Nenue@87 80 BOTTOMLEFT = 'TOPRIGHT',
Nenue@87 81 }
Nenue@87 82 local ANCHOR_INSET_DELTA = {
Nenue@87 83 TOP = {0, -1},
Nenue@87 84 TOPLEFT = {1, -1},
Nenue@87 85 TOPRIGHT = {-1,-1},
Nenue@87 86 LEFT = {1, 0},
Nenue@87 87 BOTTOMLEFT = {1, 1},
Nenue@87 88 BOTTOM = {0, 1},
Nenue@87 89 BOTTOMRIGHT = {-1, 1},
Nenue@87 90 RIGHT = {-1, 0},
Nenue@87 91 CENTER = {0, 0},
Nenue@72 92 }
Nenue@72 93
Nenue@84 94 function VeneerCore:print(...)
Nenue@84 95 local txt = '|cFFFFFF00Veneer|r:'
Nenue@84 96 for i = 1, select('#', ...) do
Nenue@84 97 txt = txt .. ' '.. tostring(select(i, ...))
Nenue@84 98 end
Nenue@84 99
Nenue@84 100 DEFAULT_CHAT_FRAME:AddMessage(txt)
Nenue@84 101 end
Nenue@84 102
Nenue@84 103 function VeneerCore:OnLoad()
Nenue@84 104 print('|cFFFFFF00Veneer!|r')
Nenue@84 105 self:RegisterEvent('ADDON_LOADED')
Nenue@84 106 self:RegisterEvent('PLAYER_LOGIN')
Nenue@84 107
Nenue@84 108 self.DEVIAN_PNAME = 'Veneer'
Nenue@84 109 self:RegisterForDrag('LeftButton')
Nenue@88 110
Nenue@88 111
Nenue@84 112 end
Nenue@84 113
Nenue@90 114 local select, IsAddOnLoaded, IsLoggedIn = select, IsAddOnLoaded, IsLoggedIn
Nenue@90 115
Nenue@84 116 function VeneerCore:OnEvent(event, ...)
Nenue@97 117 print('|cFFFF0088OnEvent()|r',event, ...)
Nenue@98 118 if (event == 'PLAYER_LOGIN') or (event == 'ADDON_LOADED') then
Nenue@90 119 print(IsLoggedIn(), self.initialized)
Nenue@84 120 if IsLoggedIn() and not self.intialized then
Nenue@84 121 self:Setup()
Nenue@90 122 self.intialized = true
Nenue@90 123 print('popping init sequence', self.intialized)
Nenue@90 124 end
Nenue@90 125
Nenue@90 126
Nenue@90 127 if self.intialized then
Nenue@90 128 local addon = ...
Nenue@90 129 if self.AddOnCheck[addon] then
Nenue@90 130 print(' - setting up '..addon..' dependent modules:')
Nenue@90 131 local keepChecking = false
Nenue@90 132 for index, handler in ipairs(self.AddOnCheck[addon]) do
Nenue@90 133 print(' -', handler:GetName(), (not handler.initialized) and (handler.addonFrame and not _G[handler.addonFrame]))
Nenue@90 134 if not handler.initialized then
Nenue@90 135 print(' '..handler:GetName()..':Setup()')
Nenue@90 136 handler:Setup()
Nenue@90 137 handler.initialized = true
Nenue@90 138 end
Nenue@90 139 end
Nenue@90 140 if not keepChecking then
Nenue@90 141 self.AddOnCheck[addon] = nil
Nenue@90 142 end
Nenue@90 143 end
Nenue@84 144 end
Nenue@84 145 end
Nenue@84 146 end
Nenue@84 147
Nenue@84 148 function VeneerCore:OnDragStart()
Nenue@84 149 self:StartMoving()
Nenue@84 150 end
Nenue@84 151
Nenue@84 152 function VeneerCore:OnDragStop()
Nenue@84 153 self:StopMovingOrSizing()
Nenue@84 154 end
Nenue@84 155
Nenue@93 156 local VeneerModule_Setup = function(frame)
Nenue@97 157 if not frame.initialized then
Nenue@97 158 local doSetup = (not frame.addonTrigger) or select(2, IsAddOnLoaded(frame.addonTrigger))
Nenue@97 159 print(' '..frame:GetName()..'.doSetup =', doSetup)
Nenue@97 160 if doSetup then
Nenue@93 161 frame:Setup()
Nenue@93 162 frame.initialized = true
Nenue@98 163 else
Nenue@98 164 Veneer:RegisterEvent('ADDON_LOADED')
Nenue@93 165 end
Nenue@97 166
Nenue@93 167 end
Nenue@93 168 end
Nenue@93 169
Nenue@84 170 function VeneerCore:Setup ()
Nenue@97 171 print('|cFFFF0088Setup()|r')
Nenue@90 172 local resetConfig = (not VeneerData)
Nenue@90 173 if (not VeneerData) then
Nenue@84 174 VeneerData = defaults
Nenue@90 175 VeneerData.version = VENEER_VERSION
Nenue@84 176 end
Nenue@84 177 self.data = VeneerData
Nenue@93 178 self:ExecuteOnClusters(nil, VeneerModule_Setup)
Nenue@90 179
Nenue@90 180 self.ConfigMode = VeneerData.ConfigMode
Nenue@90 181 self:UpdateConfigLayers()
Nenue@90 182 self:Reanchor()
Nenue@90 183 self:Update()
Nenue@87 184 end
Nenue@84 185
Nenue@90 186 function VeneerCore:UpdateConfigLayers()
Nenue@90 187 if VeneerData then
Nenue@90 188
Nenue@90 189 VeneerData.ConfigMode = self.ConfigMode
Nenue@90 190 end
Nenue@90 191
Nenue@90 192 self:print('Config mode '..(self.ConfigMode and '|cFF00FF00ON|r' or '|cFFFF0000OFF|r')..'.')
Nenue@90 193 self:ExecuteOnClusters(nil, function(frame)
Nenue@90 194 if frame.UpdateConfigLayers then
Nenue@90 195 frame:UpdateConfigLayers(self.ConfigMode)
Nenue@90 196 end
Nenue@90 197
Nenue@90 198
Nenue@90 199 if type(frame.ConfigLayer) == 'table' then
Nenue@90 200 for index, region in ipairs(frame.ConfigLayer) do
Nenue@90 201 print('setting', frame:GetName() .. '['.. index..']', 'to', self.ConfigMode)
Nenue@90 202
Nenue@90 203 region:SetShown(self.ConfigMode)
Nenue@90 204 end
Nenue@90 205 end
Nenue@90 206
Nenue@90 207 self.ConfigLayers[frame] = frame:IsShown()
Nenue@90 208 if self.ConfigMode then
Nenue@90 209 print(frame:GetName(), self.ConfigLayers[frame])
Nenue@90 210 frame:SetShown(self.ConfigMode)
Nenue@90 211 else
Nenue@90 212 frame:SetShown(self.ConfigLayers[frame])
Nenue@90 213 end
Nenue@90 214 end)
Nenue@90 215 end
Nenue@84 216
Nenue@93 217
Nenue@87 218 function VeneerCore:GetClusterFromArgs (...)
Nenue@87 219 local primaryAnchor
Nenue@87 220 local insertPosition
Nenue@90 221
Nenue@90 222
Nenue@90 223
Nenue@87 224 local clusterTable = self.FrameClusters
Nenue@87 225 for i = 1, select('#', ...) do
Nenue@87 226 local arg = select(i, ...)
Nenue@87 227 local argType = type(arg)
Nenue@87 228 if argType == 'string' then
Nenue@87 229 if not primaryAnchor then
Nenue@87 230 primaryAnchor = arg
Nenue@87 231 end
Nenue@87 232 clusterTable[arg] = clusterTable[arg] or {}
Nenue@87 233 clusterTable = clusterTable[arg]
Nenue@93 234 print(strrep(' ', i)..'anchor cluster', i, arg)
Nenue@87 235 elseif argType == 'boolean' then
Nenue@87 236 insertPosition = 1
Nenue@87 237 end
Nenue@87 238 end
Nenue@87 239 if not primaryAnchor then
Nenue@97 240 primaryAnchor = 'CENTER'
Nenue@97 241 clusterTable[primaryAnchor] = clusterTable[primaryAnchor] or {}
Nenue@97 242 clusterTable = clusterTable[primaryAnchor]
Nenue@87 243 end
Nenue@87 244 if not insertPosition then
Nenue@87 245 insertPosition = #clusterTable + 1
Nenue@87 246 end
Nenue@87 247 return primaryAnchor, clusterTable, insertPosition
Nenue@84 248 end
Nenue@84 249
Nenue@84 250 function VeneerCore:AddHandler(handler, ...)
Nenue@97 251 print('|cFFFFFF00*** Adding handler:', handler.moduleName or handler:GetName())
Nenue@87 252
Nenue@102 253 if not handler.anchorFrame then
Nenue@90 254 local anchorGroup, clusterTable, clusterIndex = self:GetClusterFromArgs(...)
Nenue@90 255 if clusterIndex == 1 then
Nenue@90 256 for i, frame in ipairs(clusterTable) do
Nenue@90 257 frame.clusterIndex = i + 1
Nenue@90 258 end
Nenue@87 259 end
Nenue@90 260 tinsert(clusterTable, clusterIndex, handler)
Nenue@102 261 print(' cluster', anchorGroup, 'table', clusterTable, 'position', clusterIndex)
Nenue@90 262
Nenue@102 263 handler.anchorCluster = clusterTable
Nenue@102 264 handler.anchorIndex = clusterIndex
Nenue@102 265 else
Nenue@103 266 local clusterTable = self.FrameClusters[LE_FREE_FRAMES_GROUP]
Nenue@103 267 handler.anchorCluster = clusterTable
Nenue@103 268 handler.anchorIndex = #clusterTable+1
Nenue@103 269 tinsert(clusterTable, handler.anchorIndex, handler)
Nenue@102 270 print(' free frame')
Nenue@102 271 end
Nenue@87 272
Nenue@84 273 for k,v in pairs(VeneerHandlerMixin) do
Nenue@84 274 if not handler[k] then
Nenue@87 275 print(' * from mixin:', k)
Nenue@84 276 handler[k] = v
Nenue@84 277 end
Nenue@84 278 end
Nenue@90 279
Nenue@90 280 if handler.addonTrigger and not IsAddOnLoaded(handler.addonTrigger) then
Nenue@90 281 print('|cFFFF4400 -- dependency:', handler.addonTrigger)
Nenue@90 282 self.AddOnCheck[handler.addonTrigger] = self.AddOnCheck[handler.addonTrigger] or {}
Nenue@90 283 tinsert(self.AddOnCheck[handler.addonTrigger], handler)
Nenue@90 284 end
Nenue@90 285
Nenue@87 286 if self.initialized then
Nenue@90 287 print(' -- initialization check')
Nenue@90 288 if handler.Setup then
Nenue@90 289 local doInit = (not handler.initialized)
Nenue@90 290 if handler.addonTrigger and not IsAddOnLoaded(handler.addonTrigger) then
Nenue@90 291 doInit = false
Nenue@90 292 end
Nenue@90 293 -- room to add other checks
Nenue@90 294
Nenue@90 295 if doInit then
Nenue@90 296 handler:Setup()
Nenue@90 297 handler.initialized = true
Nenue@90 298 self:InternalReanchor(handler)
Nenue@90 299 end
Nenue@87 300 end
Nenue@87 301 end
Nenue@87 302 end
Nenue@87 303
Nenue@87 304 function VeneerCore:Reanchor()
Nenue@87 305 self:ExecuteOnClusters(nil, 'Reanchor')
Nenue@88 306 self:DynamicReanchor(self)
Nenue@87 307 end
Nenue@87 308
Nenue@87 309 function VeneerCore:Update()
Nenue@90 310 self:ExecuteOnClusters(nil, function(frame)
Nenue@90 311 if frame.initialized and frame.Update then
Nenue@90 312 frame:Update()
Nenue@90 313 end
Nenue@90 314 end)
Nenue@88 315 self:Reanchor()
Nenue@87 316 end
Nenue@87 317
Nenue@87 318 -- updates anchor relations to and from the target handler
Nenue@87 319 function VeneerCore:GetAnchor(...)
Nenue@87 320
Nenue@87 321 end
Nenue@87 322
Nenue@88 323 -- Evaluates frames visibility and chains them accordingly
Nenue@88 324
Nenue@88 325 function VeneerCore:DynamicReanchor(parent)
Nenue@88 326 parent = parent or self
Nenue@88 327 print('|cFF88FF00DynamicReanchor()')
Nenue@88 328 for anchorPoint, cluster in pairs(parent.FrameClusters) do
Nenue@103 329 if anchorPoint ~= LE_FREE_FRAMES_GROUP then
Nenue@103 330 local lastFrame
Nenue@103 331 for index, frame in ipairs(cluster) do
Nenue@103 332 print(' |cFF00FF00'..index, frame:GetName(), frame:IsVisible(), (lastFrame and ('|cFFFFFF00'..lastFrame:GetName()..'|r') or '|cFF00FFFFUIParent'))
Nenue@103 333 if frame:IsVisible() then
Nenue@90 334
Nenue@103 335 if frame.anchorFrame then
Nenue@103 336 print(frame.anchorPoint)
Nenue@103 337 frame:SetPoint(frame.anchorPoint, frame.anchorFrame, frame.anchorFrom, frame.anchorX, frame.anchorY)
Nenue@103 338 print(frame:GetTop(), frame:GetRight())
Nenue@90 339 else
Nenue@103 340 anchorPoint = frame.anchorPoint or anchorPoint
Nenue@103 341 frame:ClearAllPoints()
Nenue@103 342 if lastFrame then
Nenue@103 343 frame:SetPoint(anchorPoint, lastFrame, ANCHOR_OFFSET_POINT[anchorPoint], 0, 0)
Nenue@103 344 else
Nenue@103 345 frame:SetPoint(anchorPoint, UIParent, anchorPoint, frame.anchorX, frame.anchorY)
Nenue@103 346 end
Nenue@103 347 print(frame:GetTop(), frame:GetRight())
Nenue@103 348 lastFrame = frame
Nenue@90 349 end
Nenue@103 350
Nenue@88 351 end
Nenue@90 352
Nenue@88 353 end
Nenue@103 354 end
Nenue@88 355
Nenue@88 356 end
Nenue@88 357 end
Nenue@88 358
Nenue@88 359 -- Evaluates the current visibility state and re-anchors adjacent blocks accordingly
Nenue@87 360 function VeneerCore:InternalReanchor(handler, printFunc)
Nenue@87 361 print('|cFF00FFFFVeneer:InternalReanchor('..handler:GetName()..')')
Nenue@90 362 if handler.anchorFrame then
Nenue@90 363 handler:SetPoint(handler.anchorPoint, handler.anchorFrame, handler.anchorFrom, handler.anchorX, handler.anchorY)
Nenue@90 364 return
Nenue@90 365 end
Nenue@90 366
Nenue@90 367
Nenue@87 368 local anchorPoint = handler.anchorPath or handler.anchorPoint
Nenue@87 369 local anchorParent, anchorTo = UIParent, anchorPoint
Nenue@88 370 local subPoint, subTo
Nenue@88 371 local nextFrame
Nenue@88 372 for index, frame in ipairs(handler.anchorCluster) do
Nenue@88 373 print(' |cFF00FF00'..index, frame:GetName(), frame:IsVisible())
Nenue@88 374 if frame:IsVisible() then
Nenue@88 375 if frame ~= handler then
Nenue@88 376 anchorParent = frame
Nenue@88 377 anchorTo = ANCHOR_OFFSET_POINT[anchorPoint]
Nenue@87 378
Nenue@88 379 else
Nenue@88 380 nextFrame = handler.anchorCluster[index+1]
Nenue@88 381 if nextFrame then
Nenue@88 382
Nenue@88 383 subPoint = nextFrame.anchorPath or nextFrame.anchorPoint
Nenue@88 384 subTo = ANCHOR_OFFSET_POINT[subPoint]
Nenue@88 385 nextFrame:ClearAllPoints()
Nenue@88 386 nextFrame:SetPoint(subPoint, handler, subTo, 0, 0)
Nenue@88 387 print(' -- pushing '..nextFrame:GetName()..' down the anchor chain', subPoint, subTo)
Nenue@88 388 end
Nenue@88 389 break
Nenue@87 390 end
Nenue@87 391 end
Nenue@87 392 end
Nenue@87 393
Nenue@88 394 if handler:IsVisible() then
Nenue@88 395 handler:SetPoint(anchorPoint, anchorParent, anchorTo, 0, 0)
Nenue@88 396 else
Nenue@88 397 if anchorParent and nextFrame then
Nenue@88 398 nextFrame:SetPoint(subPoint, handler, subTo, 0, 0)
Nenue@88 399 end
Nenue@88 400 end
Nenue@88 401
Nenue@87 402
Nenue@87 403 print(handler.anchorPoint, anchorParent, anchorTo)
Nenue@87 404 if printFunc then
Nenue@87 405 printFunc('|cFF88FF00'..handler:GetName()..':SetPoint(', handler.anchorPoint, anchorParent, anchorTo)
Nenue@87 406 end
Nenue@88 407 end
Nenue@87 408
Nenue@88 409 function VeneerCore:SlideBlock(frame, ...)
Nenue@89 410 local aX, aY = frame:GetLeft(), frame:GetTop()
Nenue@88 411
Nenue@89 412 frame:SetPoint('TOPLEFT', frame, 'BOTTOMLEFT', aX, aY)
Nenue@89 413 frame.animation = frame.animation or {}
Nenue@89 414 frame.animation.startX = aX
Nenue@89 415 frame.animation.startY = aY
Nenue@88 416
Nenue@89 417 local targetPoint, targetParent, targetAnchor, offsetX, offsetY = ...
Nenue@89 418 frame.BlockSlide:SetScript('OnFinished', function()
Nenue@89 419 frame:SetPoint(targetPoint, targetParent, targetAnchor, offsetX, offsetY)
Nenue@89 420 VeneerAnimationMixin.OnFinished(frame)
Nenue@89 421 end)
Nenue@88 422
Nenue@84 423 end
Nenue@84 424
Nenue@88 425
Nenue@84 426 function VeneerCore:ExecuteOnClusters(layer, method)
Nenue@84 427 self.parserDepth = self.parserDepth + 1
Nenue@84 428 if not layer then
Nenue@87 429 if self.parserDepth > 1 then
Nenue@84 430 tinsert(self.pendingCalls, method)
Nenue@84 431 print('delaying walk for', method)
Nenue@84 432 return
Nenue@84 433 end
Nenue@97 434 print('|cFF00FF00ExecuteOnClusters|r('..tostring(layer)..', '..tostring(method)..')')
Nenue@84 435 else
Nenue@87 436 print(' Level '..self.parserDepth)
Nenue@84 437 end
Nenue@87 438
Nenue@87 439 layer = layer or self.FrameClusters
Nenue@84 440 for anchor, cluster in pairs(layer) do
Nenue@84 441 for index, frame in ipairs(cluster) do
Nenue@87 442 print(' '..anchor..'.'..index..' = '..frame:GetName())
Nenue@90 443 if type(method) == 'function' then
Nenue@90 444 method(frame, true)
Nenue@90 445 elseif frame[method] then
Nenue@87 446 print(' |cFF00FF00'..frame:GetName())
Nenue@87 447 frame[method](frame, true)
Nenue@84 448 end
Nenue@84 449 end
Nenue@84 450 if cluster.FrameClusters then
Nenue@84 451 self:ExecuteOnClusters(cluster.FrameClusters, method)
Nenue@84 452 end
Nenue@84 453 end
Nenue@84 454 self.parserDepth = self.parserDepth - 1
Nenue@84 455
Nenue@84 456 if (self.parserDepth == 0) and (#self.pendingCalls >= 1) then
Nenue@84 457 local delayedMethod = tremove(self.pendingCalls, 1)
Nenue@84 458 print('starting delayed walk for', delayedMethod)
Nenue@84 459 self:ExecuteOnClusters(nil, delayedMethod)
Nenue@84 460 end
Nenue@84 461 end
Nenue@84 462
Nenue@72 463
Nenue@71 464
Nenue@88 465 -- Takes frame handle and assigns a block to it
Nenue@84 466 function VeneerCore:Acquire (frame, template)
Nenue@71 467 if not frame then
Nenue@71 468 print('|cFFFF4400Unable to acquire frame...|r')
Nenue@71 469 return
Nenue@71 470 end
Nenue@84 471 local veneer = self.Frames[frame]
Nenue@84 472 if not veneer then
Nenue@94 473 local name = GetAnonymousName()
Nenue@94 474 veneer = CreateFrame('Frame', name, frame, template)
Nenue@90 475 print(self:GetName()..':Acquire()', frame:GetName(), template)
Nenue@71 476
Nenue@84 477 veneer:SetAllPoints(frame)
Nenue@84 478 veneer:SetParent(frame)
Nenue@84 479 veneer.label:SetText(name)
Nenue@84 480 veneer.bg:SetColorTexture(0,0,0,0)
Nenue@84 481 veneer:Hide()
Nenue@84 482 veneer:EnableMouse(false)
Nenue@84 483 -- find current X/Y
Nenue@84 484 veneer.currentLeft = frame:GetLeft()
Nenue@84 485 veneer.currentTop = frame:GetTop()
Nenue@84 486 self.Frames[frame] = veneer
Nenue@71 487 end
Nenue@84 488 return veneer
Nenue@88 489 end