Files
Basalt/docs/objects/Container/updateZIndex.md
Robert Jelic 8168fa4465 1.7 stuff
The master branch was reverted to 1.7 because it was very unstable (bugs and stuff that wasn't mentioned on the documentation page yet) - features will come back with 2.0

- fixed debug window
- fixed flexbox not sending drag events to it's children

- small docs updates for 1.7
- removed the examples because the are outdated
2024-03-13 09:57:07 +01:00

604 B

updateZIndex

Description

Updates the z-index of a specified object within the container. This is useful when you need to change the z-index of an object after it has been added to the container.

Parameters

  1. object The object whose z-index you want to update.
  2. number The new z-index value for the object.

Returns

  1. object The object in use

Usage

local frame = basalt.createFrame()
local button1 = frame:addButton():setZIndex(1)
local button2 = frame:addButton():setZIndex(2)

-- Update button1's z-index to be above button2
frame:updateZIndex(button1, 3)