How to bring an object to the front? #29
Answered
by
NoryiE
luiz00martins
asked this question in
Q&A
-
Say you add an object A to the frame, and then an Object B, in that order. It seems that, by default, B will be in front of A. How may I dynamically bring A or B to the front of the frame? |
Beta Was this translation helpful? Give feedback.
Answered by
NoryiE
Oct 8, 2022
Replies: 1 comment 2 replies
-
When you create 2 objects of the same type, they have by default the same z-index (for example buttons have 5). This means the latest object will be the most foreground object if it's the same z-index. However you can change the z-index by using for example :setZIndex(6) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
luiz00martins
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you create 2 objects of the same type, they have by default the same z-index (for example buttons have 5). This means the latest object will be the most foreground object if it's the same z-index. However you can change the z-index by using for example :setZIndex(6)
https://basalt.madefor.cc/#/objects/Object/setZIndex