-
Notifications
You must be signed in to change notification settings - Fork 112
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
Use a dialog window when saving a game or recording #638
Conversation
saveRecordingNoPrompt(recordingFilename); | ||
} else { | ||
blackOutScreen(); |
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.
so when we get a "supervictory" (mastery) does it snap to black and show dialog? oh wait it fades back to black beforehand doesn't it?
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.
i wasn't sure so i just checked in wizard mode. it's a "snap", not a fade. so the achievements screen gets blacked out, the the save dialog is presented, then the high scores, and then back to the title menu.
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.
Ok I just tested this. I misunderstood what was going on - this new version is a-ok
do { | ||
askAgain = false; | ||
if (getInputTextString(filePathWithoutSuffix, "Save game as (<esc> to cancel): ", | ||
BROGUE_FILENAME_MAX - strlen(GAME_SUFFIX), filePathWithoutSuffix, GAME_SUFFIX, TEXT_INPUT_FILENAME, false)) { | ||
MAX_TEXT_INPUT_FILENAME_LENGTH, filePathWithoutSuffix, GAME_SUFFIX, TEXT_INPUT_FILENAME, true)) { |
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.
Q: personally I like the prompt matching the UI of the messages on the post-game screen (I put effort in the past to preserve this), is there any functionality downside to leaving this one false?
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.
i'm not sure what you mean by the "prompt matching the UI of the messages".
the genesis of this change is from the feats/achievements rework (which is pretty much done). i'll try to recall my thinking as it relates to the save dialog. in my current implementation, feats have a score value, so that required shifting the list of achievements to the left. that resulted in the save dialog looking out of place but getInputTextString doesn't allow for granular placement of the prompt. also, i wasn't sure how many feats might need to be displayed so i thought it might be better to move the save to a new screen entirely.
it might be worth doing a quick discord call to talk through (with screen share).
Previously, file save operations used the message pane, which is a dungeon UI component. However, when the player wins or dies, the dungeon UI is no longer visible, so the location of the message pane and any related message management is no longer relevant.
This change updates the UI so that game save and recording save operations use a centered dialog. The dialog title displays the prompt and the filename is entered on the line below, which accommodates much long file names. This is especially nice for the long filenames generated by debug builds but is also generally useful since the filename now includes a variant identifier and version number and can also include the mode name (e.g. wizard). I added some long filename handling so the initially generated filename is truncated to fit in the available space and the max length is enforced when typing, with no off-screen overflow.