netfox icon indicating copy to clipboard operation
netfox copied to clipboard

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

Open TheYellowArchitect opened this issue 1 year ago • 1 comments

(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

TheYellowArchitect avatar Sep 22 '24 19:09 TheYellowArchitect

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

annamaria-szentpeteri avatar Oct 03 '24 19:10 annamaria-szentpeteri

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.

elementbound avatar Oct 08 '24 13:10 elementbound

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

TheYellowArchitect avatar Oct 08 '24 17:10 TheYellowArchitect

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

annamaria-szentpeteri avatar Oct 08 '24 18:10 annamaria-szentpeteri

@annamaria-szentpeteri please feel free!

elementbound avatar Oct 08 '24 18:10 elementbound

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 avatar Oct 19 '24 20:10 TheYellowArchitect

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

TheYellowArchitect avatar Oct 23 '24 11:10 TheYellowArchitect

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

elementbound avatar Nov 02 '24 10:11 elementbound