Docs Update
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
local elementManager = require("elementManager")
|
||||
local Container = elementManager.getElement("Container")
|
||||
|
||||
--- This is the frame class. It serves as a grouping container for other elements.
|
||||
---@class Frame : Container
|
||||
local Frame = setmetatable({}, Container)
|
||||
Frame.__index = Frame
|
||||
|
||||
---@event onResize {width number, height number} Fired when the frame is resized
|
||||
Frame.listenTo(Frame, "resize")
|
||||
|
||||
--- Creates a new Frame instance
|
||||
--- @return Frame object The newly created Frame instance
|
||||
--- @usage local element = Frame.new("myId", basalt)
|
||||
--- @shortDescription Creates a new Frame instance
|
||||
--- @return Frame self The newly created Frame instance
|
||||
--- @usage local frame = Frame.new()
|
||||
function Frame.new()
|
||||
local self = setmetatable({}, Frame):__init()
|
||||
self.set("width", 12)
|
||||
@@ -18,9 +23,14 @@ function Frame.new()
|
||||
end
|
||||
|
||||
--- Initializes the Frame instance
|
||||
--- @shortDescription Initializes the Frame instance
|
||||
--- @param props table The properties to initialize the element with
|
||||
--- @param basalt table The basalt instance
|
||||
--- @return Frame self The initialized instance
|
||||
function Frame:init(props, basalt)
|
||||
Container.init(self, props, basalt)
|
||||
self.set("type", "Frame")
|
||||
return self
|
||||
end
|
||||
|
||||
return Frame
|
||||
Reference in New Issue
Block a user