Skip to content

Fixed NetworkPopup.tscn UI so the buttons host and join are always visible#285

Merged
elementbound merged 14 commits intofoxssake:mainfrom
TheYellowArchitect:ui-hostjoin-fix
Nov 2, 2024
Merged

Fixed NetworkPopup.tscn UI so the buttons host and join are always visible#285
elementbound merged 14 commits intofoxssake:mainfrom
TheYellowArchitect:ui-hostjoin-fix

Conversation

@TheYellowArchitect
Copy link
Copy Markdown
Contributor

@TheYellowArchitect TheYellowArchitect commented Sep 22, 2024

(Literally the 2 inspector changes in #240 but without that whole 4.3 baggage, reposting images below)

Before
before

After
after

Below is on the scene itself, before:
before-hostjoin

After (noray was taken in mind)
final-hostjoin
final-noray

Ideally, host/join would be on the bottom of the panel, but I would have to make a new Control node, and that would be too much for sth like this

@annamaria-szentpeteri
Copy link
Copy Markdown

Since only the example project is modified in this PR, the version bumps for the netfox libraries aren't necessary.

reverted 1 version bump
reverted 1 version bump
reverted 1 version bump
reverted 1 version bump
@elementbound
Copy link
Copy Markdown
Contributor

Thanks for working on this! The way I understand, the current changes are to shrink the UI.

Would it be possible to have the panel have a max size ( i.e. no bigger than 540x540 ), but shrink if the window gets smaller, and keep it centered? Let me know if you'd like to work on this, otherwise I can mess around with it too.

@TheYellowArchitect
Copy link
Copy Markdown
Contributor Author

TheYellowArchitect commented Oct 8, 2024

It would need custom code to scale down, as the Control property works via anchors, doesn't have a Scale property like Node2D and Node3D and will not downscale its elements within. I am unfamiliar with shrinking UI in Godot (I have done it only once), so if you manage to do it without much coding, do share

As for implementing the suggestion, not worth the time imo. This PR took 5 minutes. Gathering the images and doing the git push took more time than making this. I would recommend just merging this and using the saved time for netcoding PRs, instead of UI which anyone can do with trial&error

@annamaria-szentpeteri
Copy link
Copy Markdown

I can take a look at making the window scaleable if it's alright with you all.

@elementbound
Copy link
Copy Markdown
Contributor

@annamaria-szentpeteri please feel free!

@TheYellowArchitect
Copy link
Copy Markdown
Contributor Author

TheYellowArchitect commented Oct 19, 2024

I just realized that this NetworkPopup.tscn which is used in both multiplayer-simple.tscn and multiplayer-netfox.tscn examples, is not used in forest-brawl. This is understandable, given forest brawl includes player name and the settings tab.

Anyway, this PR is exclusively for these 2 examples multiplayer-simple.tscn and multiplayer-netfox.tscn not forest-brawl.

@TheYellowArchitect
Copy link
Copy Markdown
Contributor Author

Happened to stumble into a video which explains scaling Control nodes without code, sharing it here:
https://www.youtube.com/watch?v=blPqie3Z_F0

@elementbound
Copy link
Copy Markdown
Contributor

Added a custom minimum size and centered the panel, so it will be visible in many more cases.

@elementbound elementbound merged commit 91000a7 into foxssake:main Nov 2, 2024
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.

3 participants