- New Objects (Flexbox, Graph, Treeview) - Pluginsystem to add/remove functionality - Reworked the entire Object system, instead of one big Object Class we have multiple classes: Object, VisualObject, ChangeableObject - Instead of one big Frame Class we have multiple Frame Classes: BaseFrame, Frame, MovableFrame, ScrollableFrame, MonitorFrame, Flexbox - Removed the Animation Object, and added a animation plugin instead - Removed the Graphic Object and merged it's functionality with the image object - Updated currently existing objects
745 B
745 B
setZIndex
Description
Sets the z-index for the object. A higher value means a higher draw and event priority. You can also add multiple objects to the same z-index; in this case, the last added object will have the highest priority.
Parameters
numberz-index
Returns
objectThe object in use
Usage
- Sets the button's z-index to
1and the label's z-index to2
local basalt = require("basalt")
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setZIndex(1):setPosition(2,2)
local aLabel = mainFrame:addLabel():setZIndex(2):setPosition(2,2):setText("I am a label!")
<button x="2" y="2" zIndex="1" />
<label x="2" y="2" text="I am a label!" zIndex="2" />