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

Window Scaling and Settings Menu #65

Merged
merged 10 commits into from
Mar 8, 2022
Merged

Window Scaling and Settings Menu #65

merged 10 commits into from
Mar 8, 2022

Conversation

SuperShadowPlay
Copy link
Member

@SuperShadowPlay SuperShadowPlay commented Mar 4, 2022

Added:

  • Basic window scaling
    • This is simply a multiplier on the base resolution of the game. While simple, it works well enough until we want to add some more complex HUD elements or allowing fullscreen resolution.
  • A settings menu
    • Accessed by pressing the right arrow on the pause screen, it allows you to adjust screen resolution and game volume.
  • Reworked a few internal menu systems
    • shipMenu.lua no longer has a duplicate copy of the blinking function
    • Menu key mapping has been simplified to where every menu has it's own key_map table, but it will fall back on the main menu's map if nothing is found.

Left for later:

  • At this point, it may be useful to extend this new settings menu into a carousel that will allow for more "pages" of settings (mainly for keybinds).
  • Allow player to wipe existing save data.

Closes #50
Partially addresses #64 (Blocked by #49)

@SuperShadowPlay SuperShadowPlay added the type: enhancement New feature or request label Mar 4, 2022
@SuperShadowPlay SuperShadowPlay self-assigned this Mar 4, 2022
@@ -20,7 +19,7 @@ local UpdateEntityAnimation = require('systems/UpdateEntityAnimation')
local SpaceFriction = require('systems/SpaceFriction')

love.load = function()
love.window.setMode(800, 600)
love.window.updateMode(State.camera.window_width, State.camera.window_height)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add love.window.updateMode to the mocks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@SuperShadowPlay SuperShadowPlay marked this pull request as ready for review March 8, 2022 02:50
Copy link
Member

@wyatt-herkamp wyatt-herkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, code looks good. I will test later.

Copy link
Contributor

@Jon-Cavaliere Jon-Cavaliere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, code makes sense

@SuperShadowPlay SuperShadowPlay merged commit dcde2b2 into master Mar 8, 2022
@SuperShadowPlay SuperShadowPlay deleted the resize-window branch March 8, 2022 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resizable Window
4 participants