Back To

How to make the game full screen?

Hi – could someone advise me on how to make the game full screen?
I’ve tried in the display.ron file to no avail and the docs don’t make it clear how I should construct the MonitorIndent to put in the Option for the fullscreen key.
Maybe it shouldn’t be done in the display.ron file?
BTW, sorry if the docs in fact do make it clear and I’m missing it – I can be something of a klutz!

Heya, I tried this in my project, and it made it full screen:

  title: "Autexousious",
  dimensions: Some((800, 600)),
  max_dimensions: None,
  min_dimensions: None,
  fullscreen: Some(MonitorIdent(0, "default")),
  multisampling: 0,
  visibility: true,
  vsync: false,

As for the docs, am sure they can be improved – it’s become a habit for myself to look at code instead of docs, which may be a sign :sweat_smile:.


@azriel91 – thanks so much for that, it works to put it in full screen.
However, now the UI interactions are really flaky. Some elements, that appear just fine in windowed mode, don’t appear (even though their events are definitely getting triggered). There’s a button that will work for a short while, and apply its hover colour on mouseover for a short while, but that stops working after a second or two.
Is this something you’ve come across? Might you be able to suggest what I need to look into to fix it?
And thanks again for your help, it’s really appreciated!

Hm, haven’t got a clue around that one (sorry!). I know that the UI pass doesn’t scale objects based on hi-dpi though. Perhaps can investigate that. This illustration may help:

Correct window size, text is in the middle of the screen:

If I resize the window to be taller and longer, the text is still the same number of pixels from the bottom left corner of the window, but it doesn’t get scaled up (zoomed in) like the other images.

Works for me! thanks! :slight_smile: