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
Add GUI screen to name a recording #3548
Conversation
Adds a helper function to RecordScreen that renames the recording to a provided title. This commit does not integrate this function into the UI.
Adds a NUI popup to RecordScreen to implement the helper function to rename a recording. Checks for if a recording with the same name already exists, and if so, will prompt the user to enter a different name for the recording.
This commit changes the behavior of recording renaming, from requesting only when there is a name conflict, to requesting upon every new recording. Because the rename prompt occurs on every recording, the popup has been changed to a separate screen altogether. Many functions from RecordScreen have been transplanted to accomodate this change.
… change isNameValid Adds translation strings to the GUI for the rename screen. Includes an (attempted) French translation. Also adds a step to the name validity check, checking for names made of invalid characters.
Can one of the admins please verify this patch? |
@GooeyHub: ok to test Will review shortly |
Hooray Jenkins reported success with all tests good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, these changes look pretty solid! Besides the changes I requested directly on the code, I noticed a small bug: If you try to give an already existing name to a new recording, the message "A recording with this name already exists! Enter a different name." appears, and if I click on "cancel" and try to name another recording, this message is still there instead of "Enter a unique name for this recording."
engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/RecordScreen.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/NameRecordingScreen.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, @AndyTechGuy! Minor tweaks are required.
engine/src/main/java/org/terasology/rendering/nui/layers/mainMenu/NameRecordingScreen.java
Outdated
Show resolved
Hide resolved
Fixes issues brought up in PR reviews, including: - Screen error messages now reset when player opens the screen - File path comparison now performed properly - Renames screen launching function in RecordScreen - Removes unused 'title' field in NameRecordingScreen
Hooray Jenkins reported success with all tests good! |
The issues brought up in both reviews have (hopefully) been addressed, this should be ready for review again! |
The last commit solved the problems I mentioned! |
Contains
Adds the screen
nameRecordingScreen
after the selection of a game to record, prompting the player to make a unique name for their new recording. The screen prevents naming a recording with the same name as an existing recording, resolving #3465. If the player enters an invalid file name (blank, entirely invalid characters, existing recording), the player is prompted to re-enter a name.The structure of
RecordScreen
has been changed, now primary file operations and loading for the recording are now handled inNameRecordingScreen
.How to test
Translation
nameRecordingScreen
@iaronaraujo