Replace the "Done" button with context-aware prompts#14547
Open
simsor wants to merge 1 commit into
Open
Conversation
- Adds Constants.Option.CUSTOM_SELECT_MESSAGE - Uses this option to change the "Done" button to either "No response" or the name of the next phase. - Update "pressOKYesOrDone()" to handle these new button values
f0a48b3 to
e275649
Compare
Contributor
|
I like this idea overall, but many things could be improved further.
|
Member
|
BTW there were many reports on bad GUI after done/cancel button logic change some years ago -- many players remember size-position of the buttons and clicks on it without mouse move. So old changes were reverted. Just keep it in mind for use cases research. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal of this PR is to change the "Done" button to be more context-aware (this should fix part of #1802 )
It adds a new
OptionforFeedbackPanel.prepareFeedback()calledCUSTOM_SELECT_MESSAGE, which overrides the "Done" message if it is present.Then,
GamePanel.select()has some more logic to set a custom message:Cheers!
EDIT: I have also updated
pressYesOkOrDone()to auto-press "No response" or any button which matches a phase transition. Because this required having the phase step order again, I moved this list to thePhaseStepclass, as a static member (I hope that's OK).