load StateDriver libraries & update files as needed (Needs more testing)

This commit is contained in:
Crum
2018-06-07 01:28:29 -05:00
parent cd7ea3556e
commit 26ca83f608
10 changed files with 910 additions and 109 deletions
+26
View File
@@ -0,0 +1,26 @@
--[[
Classy.lua
A wrapper for defining classes that inherit from widgets
--]]
local Classy = LibStub:NewLibrary('Classy-1.0', 0)
if not Classy then return end
function Classy:New(frameType, parentClass)
local class = CreateFrame(frameType)
class.mt = {__index = class}
if parentClass then
class = setmetatable(class, {__index = parentClass})
class.super = function(self, method, ...)
parentClass[method](self, unpack(arg))
end
end
class.Bind = function(self, obj)
return setmetatable(obj, self.mt)
end
return class
end