From 8d6d36934572471437faee1838cace91550b091c Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Tue, 26 Apr 2022 17:39:25 +0200 Subject: [PATCH] Updated Object (markdown) --- Object.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Object.md b/Object.md index da1c056..8d86fa7 100644 --- a/Object.md +++ b/Object.md @@ -65,7 +65,7 @@ local aButton = mainFrame:addButton("myFirstButton"):setFocus():show() **returns:** the object
## setZIndex -changes the z index (lower z index do have higher draw priority) +changes the z index (higher z index do have higher draw priority) 10 is more important than 5 or 1. You are also able to add multiple objects to the same z index, which means if you create a couple of buttons, you set their z index to 10, everything below 10 is less important, everything above 10 is more important. On the same z index: the last object which gets created is the most important one. ````lua local mainFrame = basalt.createFrame("myFirstFrame"):show() local aButton = mainFrame:addButton("myFirstButton"):setZIndex(1):show()