- 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)