Files
Basalt/docs/docs1_6/objects/Frame/addObject.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

548 B

add<Object>

Adds a new object. Don't use add<Object> please use addTheObjectYouNeed For example if you want a new Frame, use addFrame, if you want to add a button, use addButton

Parameters:

  1. string optional - the id if you don't add a id it will autimatically generate one for you

Returns:

  1. object The new object you've created

Usage:

  • Creates some example objects
local main = basalt.createFrame()
local button = main:addButton()
local label = main:addLabel()
local frame = main:addFrame()