Moving the window to a different monitor #17940
Unanswered
ethanmdavidson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like the game window to open on a different monitor, so that it doesn't cover the IDE when it starts up. I tried the following code but it doesn't seem to have any effect:
In the console, I do see it print
hello-world has moved to DP-2
so I'm very confident that I'm finding the right monitor and changing the position field.I've also tried setting the monitor during window creation (
position: WindowPosition::Centered(MonitorSelection::Index(0)),
with various index values) but this also has no effect. I also triedWindowPosition::Centered(MonitorSelection::Primary)
but this too has no effect. Regardless of what index I select, the window starts on the monitor that has focus, and stays in the same place. It doesn't even center itself!I'm a newbie to both rust and bevy so I might be missing something obvious here.
Beta Was this translation helpful? Give feedback.
All reactions