8000 Paint everything in the middle of the applet by StenAL · Pull Request #110 · PhilippvK/playforia-minigolf · GitHub
[go: up one dir, main page]

Skip to content

Paint everything in the middle of the applet - #110

Merged
PhilippvK merged 6 commits into
PhilippvK:masterfrom
StenAL:features
May 31, 2024
Merged

PhilippvK merged 6 commits into
PhilippvK:masterfrom
StenAL:features

Conversation

@StenAL
@StenAL StenAL commented May 29, 2024
Copy link
Copy Markdown

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.

StenAL added 6 commits May 29, 2024 08:43
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 mo
8000
dern 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
@PhilippvK
Copy link
Copy Markdown
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

0