Class ConfirmationDialog
A ThemeElement prefab used to prompt the user with 'Yes' or 'No' questions. Such as confirming their action that can interrupt the active running timer. Supports custom text.
Inheritance
Implements
Inherited Members
Namespace: AdrianMiasik.Components.Core
Assembly: Assembly-CSharp.dll
Syntax
public class ConfirmationDialog : ThemeElement, IColorHook
Methods
| Improve this Doc View SourceCancel()
Invokes our AdrianMiasik.Components.Core.ConfirmationDialog.onCancel action and Close(Boolean)s this panel.
Declaration
public void Cancel()
Close(Boolean)
Properly disposes/destroys this ConfirmationDialog.
Declaration
public void Close(bool checkInterruptibility = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | checkInterruptibility | Do you want to check if our timer allows for this popup to be interrupted? If no, we will destroy the popup regardless of the PomodoroTimer's preference. Otherwise, we'll check in with PomodoroTimer to see if this popup is interruptible before attempting destruction. |
ColorUpdate(Theme)
Applies our Theme changes to our referenced components when necessary.
Declaration
public override void ColorUpdate(Theme theme)
Parameters
Type | Name | Description |
---|---|---|
Theme | theme | The theme to apply on our referenced components. |
Overrides
| Improve this Doc View SourceInitialize(PomodoroTimer, ConfirmationDialogManager, Action, Action, String, String)
Setup our confirmation dialog with custom actions and overrideable text.
Declaration
public void Initialize(PomodoroTimer pomodoroTimer, ConfirmationDialogManager manager, Action submit, Action cancel, string topText = null, string bottomText = null)
Parameters
Type | Name | Description |
---|---|---|
PomodoroTimer | pomodoroTimer | Main class reference |
ConfirmationDialogManager | manager | |
System.Action | submit | The action you want to take when the user presses yes |
System.Action | cancel | The action you want to take when the user presses no |
System.String | topText | Optional: The top text label you want to override |
System.String | bottomText | Optional: The bottom text label you want to override |
Show()
Declaration
public void Show()
Submit()
Invokes our AdrianMiasik.Components.Core.ConfirmationDialog.onSubmit action and Close(Boolean)s this panel.
Declaration
public void Submit()