annotate Veneer.lua @ 107:ff00679a7817

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