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

Paint everything in the middle of the applet #110

Merged
merged 6 commits into from
May 31, 2024

Conversation

StenAL
Copy link

@StenAL StenAL commented May 29, 2024

This PR adds the following features:

  • The game is now painted in the center of the applet. Now, resizing the applet actually does something as the content is painted in the middle of it and IMO looks better. Since the game now utilizes space better, I also increased the default window size to 1280x720p.
Before After
Screencast_20240529_085056.webm
Screencast_20240529_085636.webm
  • Game audio can now be muted from the lobby selection screen. This is useful when playing multiple games on the same host to have audio only played once. To fit this on the home screen, I shifted the graphics settings up by a bit.

This is useful when playing multiple games on the same host to have
audio only played once. To fit this on the home screen, I shifted the
graphics settings up by a bit.
This was helpful to figure out how and where things are painted in order
to center them in the applet later on.
Now, resizing the applet actually does something as the content is
painted in the middle of it. This was fairly easy to achieve since
almost all content is painted in the ContentPanel; it just had to be
centered in the applet by using a GridBagLayout. Other things directly
painted in the applet are the error texts and loading panel, which
needed their positioning to be adjusted.
Now that the content is centered, it actually makes sense to use bigger
windows more suitable for modern screens.
@StenAL StenAL changed the title Features Paint everything in the middle of the applet May 30, 2024
@PhilippvK PhilippvK merged commit db5983e into PhilippvK:master May 31, 2024
1 check passed
@PhilippvK
Copy link
Owner

Thank you for the patches!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants