Skip to content
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

In Windowed mode returning to full screen on main menu #319

Open
ac-arcana opened this issue Oct 16, 2024 · 5 comments
Open

In Windowed mode returning to full screen on main menu #319

ac-arcana opened this issue Oct 16, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@ac-arcana
Copy link
Collaborator

Cogito and Godot Engine Version:
Godot v4.2.1 b09f793f5
COGITO - current commit - c406d82

Description:
The game is not respecting my change to windowed mode after I apply it.

Reproduction steps:
Run the game from the main menu
Go to options, graphics tab, set window mode to windowed, hit apply changes.
Back out to main menu
Select a new game
Screen will briefly flash full screen, then return to windowed.
Open pause menu.
Click back to main menu.
The window returns to full screen

Expected behavior:
Once I set windowed and hit apply I expect the main menu to respect this setting when I return to it.

@ac-arcana ac-arcana added the bug Something isn't working label Oct 16, 2024
@ac-arcana ac-arcana changed the title Returning to full screen on load In Windowed mode returning to full screen on main menu Oct 16, 2024
@Phazorknight
Copy link
Owner

I have the same issue. I don't think it's strictly related to the main menu itself.
For me it occurs that when I set the window mode, the settings stay saved for one re-start, then reset.

  1. Run game (settings are reset/set to default, fullscreen mode)
  2. Open options and change settings (windowed mode)
  3. Close and run again.
  4. Stored settings are loaded (windowed mode)
  5. Close and run again
  6. All settings are reset / back to default.

I assume it's an issue with how the config is saved/loaded, but haven't had a chance to look into it yet.

@Phazorknight
Copy link
Owner

I did some investigating and I think i've pinpointed the issue:

  1. On loading the config file, the audio volume sliders are loaded
  2. As these values are loaded, the value_change signals are emitted, which in turn called the apply_changes_pressed
  3. This saves/overwrites the config file with the current values.
  4. As the volume slider values are loaded before the graphics settings, the default values for those are saved at this moment.

I've thus moved the loading of the volume sliders to the bottom, which seems to have helped.
Will put this into a future commit.

image

@OvercastInteractive
Copy link
Collaborator

There is another issue with the options menu, apart from not saving settings, and that is when you change settings and don't hit apply the button and slider states don't revert to the actual settings when reopening the options menu.

Test:
Toggle the "Invert Y" checkbox to on, don't apply changes and resume playing.
Return to the options menu to find the "Invert Y" checkbox is still on, even though the actual behavior/setting is off.

If exiting the menu without applying changes, the menu buttons should be reverted to reflect their actual values.

@Phazorknight
Copy link
Owner

@OvercastInteractive yeah, this behavior isn't implemented yet, but it should be.
I'll try to take a look to clean this up a bit.

My idea would be:

  • Users can adjust settings as they want.
  • Settings only get saved when "Apply Changes" is pressed (which will be moved to be always present and not part of tabs)
  • If users leave menu without pressing Apply Changes, nothing is saved and button states will revert to what they were before.
  • Adding a "Restore defaults" button

@Phazorknight
Copy link
Owner

Ok, I just pushed some tweaks in bfb1530

The Restore defaults button is there but currently not functional or hooked up to anything.
This is a bit tricky to test, so please give it a go and report any Issues you encounter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants