1
\$\begingroup\$

When setting my game to fullscreen, I get problems with dialogs:

  • "get_save_filename" opens in the background, and when I close it, the game doesn't react anymore.
  • Asking the user a yes/no question exits fullscreen mode and does not enter it again afterwards.
  • "window_set_fullscreen" doesn't seem to do anything either...

Can anyone help?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ How are you asking the user a yes/no question? \$\endgroup\$
    – Juanpa
    Feb 7, 2019 at 23:19
  • \$\begingroup\$ I recommend asking the questions directly in the code. Usually dialogs serve to give the developer warnings (whether or not something is happening). \$\endgroup\$ Nov 5, 2019 at 23:50
  • \$\begingroup\$ It helps to get text from the user by manipulating the keyboard_string variable. Set it to a blank string, let the user type stuff, then get the string from the variable. That way you can write your own GUI instead of relying on the default dialog boxes. \$\endgroup\$
    – user137
    Oct 30, 2020 at 17:13

1 Answer 1

0
\$\begingroup\$

By "get_save_filename" dialog, I assume you mean windows dialog to save/load your game somewhere? Here's a few tips:

  • You could potentially make a custom file explorer inside the game, which I don't really recommend, but a lot of games do it and it works.
  • You can simply save/load files only in the game's directory, so when you are about to save the game, the only thing you ask from the user is a slot number, so each user can have their own save.
  • I haven't done gaming in windows for a while, but I assume when you say "Yes/no" questions you mean opening a windows GUI that asks the user a question. From what I remember, when windows has a game fullscreen, it likes to focus on it, so any pop-up would force the game to be minimised, and potentially unload/load assets all over again. If you want your game fullscreen, you don't want to have pop-ups. To be fair, for most games, you don't want GUI pop-ups anyway, as they break immersion with the game.
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .