Show / Hide Table of Contents

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
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
ThemeElement
ConfirmationDialog
Implements
IColorHook
Inherited Members
ThemeElement.Timer
ThemeElement.Initialize(PomodoroTimer, Boolean)
ThemeElement.IsInitialized()
ThemeElement.OnDestroy()
Namespace: AdrianMiasik.Components.Core
Assembly: Assembly-CSharp.dll
Syntax
public class ConfirmationDialog : ThemeElement, IColorHook

Methods

| Improve this Doc View Source

Cancel()

Invokes our AdrianMiasik.Components.Core.ConfirmationDialog.onCancel action and Close(Boolean)s this panel. UnityEvent - Invoked by 'No' button.

Declaration
public void Cancel()
| Improve this Doc View Source

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.

| Improve this Doc View Source

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
ThemeElement.ColorUpdate(Theme)
| Improve this Doc View Source

Initialize(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

| Improve this Doc View Source

Show()

Declaration
public void Show()
| Improve this Doc View Source

Submit()

Invokes our AdrianMiasik.Components.Core.ConfirmationDialog.onSubmit action and Close(Boolean)s this panel. UnityEvent - Invoked by 'Yes' button.

Declaration
public void Submit()

Implements

IColorHook
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX