bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Expose winit always_on_top

Open laundmo opened this issue 3 years ago • 4 comments

Objective

I needed a window which is always on top, to create a overlay app.

Solution

expose the always_on_top property of winit in bevy's WindowDescriptor as a boolean flag


Changelog

Added

  • add WindowDescriptor.always_on_top which configures a window to stay on top.

laundmo avatar Nov 09 '22 17:11 laundmo

Support for this should probably be also added to Window and WindowCommand so it can be changed at runtime.

I tried this out and it's pretty simple to add and works as expected (on MacOS at least)

Feel free to use this: https://github.com/rparrett/bevy/commit/fd2a706c993ea0702294098fd2e134ae3e1bed21 (but add missing docs and whatnot)

rparrett avatar Nov 09 '22 17:11 rparrett

I'm not sure this needs its own example.

I think there's an existing window_properties example?

DJMcNab avatar Nov 09 '22 17:11 DJMcNab

Feel free to use this: https://github.com/rparrett/bevy/commit/fd2a706c993ea0702294098fd2e134ae3e1bed21 (but add missing docs and whatnot)

will do

laundmo avatar Nov 09 '22 17:11 laundmo

I'm not sure this needs its own example.

I think there's an existing window_properties example?

Once support for changing at runtime is in, this could definitely be worked into the window_settings example.

rparrett avatar Nov 09 '22 17:11 rparrett

bors r+

cart avatar Nov 14 '22 22:11 cart