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

Persist menu textinput #13685

Merged
merged 2 commits into from Aug 14, 2023
Merged

Conversation

Montandalar
Copy link
Contributor

This is purely a rebase and small fixup of #13612 . Credit to archfan7411 for the original commit. My fixups are (1) to move the new code block up as per SmallJoker's feedback and (2) a fix for when a bind address for the server is not configured, which was not working properly for the port field in the original PR.

Implementation note: The typed username persists so long as the main menu stays open, no matter what tab is visited, but isn't saved unless a server is launched or the setting is changed by some other means such as by joining a server or using the settings menu.

To do

This PR is Ready for Review.

How to test

Test 1

  1. Make sure that no bind address for the server is set.
  2. In the main menu, open the Start Game tab.
  3. Modify the username and port fields, and then (un)check one of the checkboxes above them. The text in the fields should persist correctly.

Test 2

  1. Reconfigure Minetest by setting a bind address.
  2. Proceed as for Test 1

@Montandalar Montandalar force-pushed the persist-menu-textinput branch 2 times, most recently from 43d82ed to 0c16240 Compare July 24, 2023 13:45
@Zughy Zughy added Action / change needed Code still needs changes (PR) / more information requested (Issues) Bugfix 🐛 PRs that fix a bug @ Mainmenu labels Jul 24, 2023
archfan7411 and others added 2 commits July 25, 2023 14:47
Previously, the username and port fields would be reset to their defaults when the formspec is re-sent. This persists any changes, without committing to the settings until the proper time.
Previously it was ignored if no bind address is configured due to an
oversight.
@Montandalar
Copy link
Contributor Author

Montandalar commented Jul 25, 2023

Rephrased "resending" to "updating" and force pushed. Is squashing the two current commits going to be a problem or will that work fine despite the authorship variance?

@Zughy Zughy removed the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Jul 25, 2023
Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

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

Trivial, works.

@sfan5 sfan5 merged commit 7b3ed32 into minetest:master Aug 14, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants