-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add move_to_top
and top_most_layer
#1242
Conversation
egui/src/context.rs
Outdated
@@ -889,6 +889,16 @@ impl Context { | |||
self.memory().layer_id_at(pos, resize_grab_radius_side) | |||
} | |||
|
|||
/// Top-most layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see an explanation, what is the top-most layer instead of this useless doc. The doc should answer to question when I should use it? What is its features? What this layer is contain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this?
Returns the id of the top-most area. When an area is clicked on or interacted with, it will be moved above all other areas.
My personal use case is synchronizing the selected item in a list of open windows with the window that last got focus. This is a very specific use case, but it wasn't possible to do before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a commit changing it to
The overall top-most layer. When an area is clicked on or interacted with, it is moved above all other areas.
egui/src/memory.rs
Outdated
@@ -329,6 +329,11 @@ impl Memory { | |||
self.areas.layer_id_at(pos, resize_interact_radius_side) | |||
} | |||
|
|||
/// Top-most layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
In my application, i want to be able to get and set which window is on the top. This adds a public API for that. Is this the right approach?