-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zlayer (continued) #2633
base: master
Are you sure you want to change the base?
zlayer (continued) #2633
Conversation
# Conflicts: # crates/egui/src/containers/area.rs # crates/egui/src/containers/popup.rs # crates/egui/src/context.rs # crates/egui/src/painter.rs # crates/egui/src/ui.rs
Hey, sorry for not getting to this when you got back! I got a little busy this week so it was pretty unfortunate timing. Thanks for taking care of it - feel free to lmk if there's anything more you'd like from me. |
Oh no worry at all, I was just curious to try this out a bit :) I tried yesterday putting panel frames on a negative Z layer so that widgets could use a smaller negative Z to paint behind other widgets, but it didn't work on my first go, and then I got distracted by something else… I would like to get something like that tried and working before merging. |
Gotcha! If I recall correctly, with this implementation ordering happens only within the same layer id - that is, Z-ordering determines the ordering within a specific layer. This is in line with the original proposal, which suggested including Z as part of If you want to control the ordering between layers, it becomes pretty complicated. For example, if a widget has z-order 1, but all windows have z-order 0 (and are on the same As a solution, we could introduce something like The only other solution I see is to have some kind of "scoping," that is to implement a tree structure among layers, or among UI children. So, everything in a window would be a member of the "window layer." This would allow you to order elements among themselves in a window, but would not allow you to, for example, paint something above all other windows. |
Closes #1516.
Most of the work done by @mxsdev
Continuation of #2482