Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@eliw00d eliw00d released this 05 Nov 23:36
· 3 commits to master since this release
  • Class function completely overhauled. Requires a :constructor method to be defined and instantiating an object uses the :new method. Inheritance uses the :extends method. Calls to a superclass must pass self as an argument. For example:
SomePanel = Class()

local super = SomePanel:extends(Panel)

function SomePanel:constructor()
    super(self)

    self._icon = Icon:new('ModIcons_modId_icons_icon')
end
  • Mutator methods can be chained. For example:
local panel = Panel:new()
    :setLocation(0, 0)
    :setSize(128, 128)