-
Notifications
You must be signed in to change notification settings - Fork 5
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
New confirmation dialog needed. It should be used if a user has changed a keyboard-action binding. #683
Labels
enhancement
New feature or request
Comments
falko17
added a commit
that referenced
this issue
Nov 18, 2024
This moves the ConfirmDialog out of the Drawable directories, since it is used in more situations than Drawable-specific menus. Additionally, some minor refactorings and improvements were made, notably: * The dialog is now more configurable. Specifically, the title, description, button texts, button icons, and button colors can all be set to custom values. There is also a pre-made configuration for delete confirmations. * The visuals of the dialog have been slightly changed. For example, the confirm button is now green by default, the dialog is slightly larger, there are icons on the buttons, and so on. * The dialog should now be able to handle differing text lengths better. * A static convenience method has been added to make it easier to ask the user confirmation questions. It suffices to call this static method on the class with the desired configuration (i.e., message etc.) and then await the result (see below), without the need for the caller to have access to a fitting GameObject for the dialog (or needing to handle destroying it). * The dialog has been turned into a `PlatformDependentComponent`. * A fade-in and fade-out animation has been implemented for the dialog. * Instead of utilizing callbacks, the method to show the dialog now leverages its asynchronous nature by simply waiting until the user made their choice, then returning a boolean indicating that choice. This should also more easily enable patterns such as early return, as is commonly done with the analogous `window.confirm()` method in Web development.
falko17
added a commit
that referenced
this issue
Nov 18, 2024
falko17
added a commit
that referenced
this issue
Nov 18, 2024
falko17
added a commit
that referenced
this issue
Nov 18, 2024
falko17
added a commit
that referenced
this issue
Nov 18, 2024
This moves the ConfirmDialog out of the Drawable directories, since it is used in more situations than Drawable-specific menus. Additionally, some minor refactorings and improvements were made, notably: * The dialog is now more configurable. Specifically, the title, description, button texts, button icons, and button colors can all be set to custom values. There is also a pre-made configuration for delete confirmations. * The visuals of the dialog have been slightly changed. For example, the confirm button is now green by default, the dialog is slightly larger, there are icons on the buttons, and so on. * The dialog should now be able to handle differing text lengths better. * A static convenience method has been added to make it easier to ask the user confirmation questions. It suffices to call this static method on the class with the desired configuration (i.e., message etc.) and then await the result (see below), without the need for the caller to have access to a fitting GameObject for the dialog (or needing to handle destroying it). * The dialog has been turned into a `PlatformDependentComponent`. * A fade-in and fade-out animation has been implemented for the dialog. * Instead of utilizing callbacks, the method to show the dialog now leverages its asynchronous nature by simply waiting until the user made their choice, then returning a boolean indicating that choice. This should also more easily enable patterns such as early return, as is commonly done with the analogous `window.confirm()` method in Web development.
falko17
added a commit
that referenced
this issue
Nov 18, 2024
falko17
added a commit
that referenced
this issue
Nov 18, 2024
falko17
added a commit
that referenced
this issue
Nov 20, 2024
This moves the ConfirmDialog out of the Drawable directories, since it is used in more situations than Drawable-specific menus. Additionally, some minor refactorings and improvements were made, notably: * The dialog is now more configurable. Specifically, the title, description, button texts, button icons, and button colors can all be set to custom values. There is also a pre-made configuration for delete confirmations. * The visuals of the dialog have been slightly changed. For example, the confirm button is now green by default, the dialog is slightly larger, there are icons on the buttons, and so on. * The dialog should now be able to handle differing text lengths better. * A static convenience method has been added to make it easier to ask the user confirmation questions. It suffices to call this static method on the class with the desired configuration (i.e., message etc.) and then await the result (see below), without the need for the caller to have access to a fitting GameObject for the dialog (or needing to handle destroying it). * The dialog has been turned into a `PlatformDependentComponent`. * A fade-in and fade-out animation has been implemented for the dialog. * Instead of utilizing callbacks, the method to show the dialog now leverages its asynchronous nature by simply waiting until the user made their choice, then returning a boolean indicating that choice. This should also more easily enable patterns such as early return, as is commonly done with the analogous `window.confirm()` method in Web development.
falko17
added a commit
that referenced
this issue
Nov 20, 2024
falko17
added a commit
that referenced
this issue
Nov 20, 2024
falko17
added a commit
that referenced
this issue
Nov 20, 2024
This moves the ConfirmDialog out of the Drawable directories, since it is used in more situations than Drawable-specific menus. Additionally, some minor refactorings and improvements were made, notably: * The dialog is now more configurable. Specifically, the title, description, button texts, button icons, and button colors can all be set to custom values. There is also a pre-made configuration for delete confirmations. * The visuals of the dialog have been slightly changed. For example, the confirm button is now green by default, the dialog is slightly larger, there are icons on the buttons, and so on. * The dialog should now be able to handle differing text lengths better. * A static convenience method has been added to make it easier to ask the user confirmation questions. It suffices to call this static method on the class with the desired configuration (i.e., message etc.) and then await the result (see below), without the need for the caller to have access to a fitting GameObject for the dialog (or needing to handle destroying it). * The dialog has been turned into a `PlatformDependentComponent`. * A fade-in and fade-out animation has been implemented for the dialog. * Instead of utilizing callbacks, the method to show the dialog now leverages its asynchronous nature by simply waiting until the user made their choice, then returning a boolean indicating that choice. This should also more easily enable patterns such as early return, as is commonly done with the analogous `window.confirm()` method in Web development.
falko17
added a commit
that referenced
this issue
Nov 20, 2024
falko17
added a commit
that referenced
this issue
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The user is now able to change a keyboard-action binding. Yet, if the user made an error, there is currently no way back. We could add an Undo/Redo. That is likely a bit difficult to implement. A simpler approach would be to ask the user when she/he changed the binding as to whether the new binding should be finalized.
Currently, our UI framework does not have a generic confirmation dialog. We need to add one to ask the user whether the new binding should be finalized (see above).
The text was updated successfully, but these errors were encountered: