-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add fixed_pos to Window #16
Conversation
This allows changing the position of a window by opening the window with a different value.
In my game, I want to have more control over how the windows work, e.g. control their size and position (e.g. cover the whole screen minus some padding), or disable collapsing (#15). I'm not sure you want to go with the direction of extending the Window widget. I guess the alternative would be to write a custom widget, but since everything else would be the same, here's a couple PRs to see what you think. |
Thanks for describing your use case! I think it makes sense to add helpers like these to disable parts of the If you don't even want the title bar you could consider just combining Area::new("my_area").fixed_pos([32.0, 16.0]).show(ctx, |ui| {
Frame::window(ui.style()).show(|ui| {
ui.label("Hello world!");
});
}); |
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.
Please add a docstring (even though I have been lazy and not done so for the other functions)
Thanks for showing the example of Area+Frame! In this particular usecase, I really want the UI, but I did have another one where I basically wanted a statically-positioned borderless window and wasn't sure how to do it nicely (ended up with a child |
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.
Thanks for making the changes!
This allows changing the position of a window by opening the window
with a different value.