File util/class.lua
loveui is a love2d library to provide resuable GUI widgets to love2d developers.
Functions
class (parent) | Creates a class using shallow copy. |
Functions
- class (parent)
-
Creates a class using shallow copy. An instance of the class can be created by calling the class as a function. The class'
__super
key refers to its parent class, if any. Theinit
function can be overridden to initialize instances of the class; Arguments provided when the class is called is passed to thisinit
function.Parameters
- parent: [optional] The parent class to subclass from.
Return value:
The newly created class.