Loading...
Searching...
No Matches
AdventureCore.DialogBase Class Referenceabstract

Detailed Description

base class for simple win forms style dialogs(for example 'are you sure?' Yes/No)
used from the show method from code or by using the included visual scripting nodes

https://adventure.softleitner.com/manual/utilities

Inheritance diagram for AdventureCore.DialogBase:
AdventureCore.DialogElement AdventureCore.DialogTMP AdventureCore.DialogUI

Public Member Functions

virtual void Show (string title, string text, Action< DialogResult > onClose, DialogButtons buttons=DialogButtons.Ok, DialogResult selection=DialogResult.None, DialogInput input=DialogInput.None, string inputValue=null, Sprite image=null)
 
virtual void Show (string title, string[] texts, Action< DialogResult > onClose, DialogButtons buttons=DialogButtons.Ok, DialogResult selection=DialogResult.None, DialogInput input=DialogInput.None, string inputValue=null, Sprite image=null)
 
virtual void Show (string title, string text, Action< DialogResult > onClose, string[] options, DialogResult selection=DialogResult.None, DialogInput input=DialogInput.None, string inputValue=null, Sprite image=null)
 
virtual void Show (string title, string[] texts, Action< DialogResult > onClose, string[] options, DialogResult selection=DialogResult.None, DialogInput input=DialogInput.None, string inputValue=null, Sprite image=null)
 
virtual void Focus ()
 
virtual void SetDefault ()
 
virtual void SetAbort ()
 
virtual void SetOk ()
 
virtual void SetCancel ()
 
virtual void SetDialogResult (DialogResult result)
 
virtual bool Continue ()
 
virtual void StartTimeline (DialogBehaviour behaviour)
 
virtual void EndTimeline (DialogBehaviour behaviour)
 
virtual void SetTimelineProgress (DialogBehaviour behaviour, float value)
 
virtual void SetTimelineWait (DialogBehaviour behaviour)
 
virtual void SetTimelineOpacity (float value)
 

Static Public Member Functions

static DialogBase GetDialog (string key)
 

Public Attributes

string Key
 
bool IsVisible
 
UnityEvent Opening
 
UnityEvent Continuing
 
UnityEvent Waiting
 
UnityEvent< DialogResult > Closing
 
UnityEvent< DialogResult > Closed
 

Static Public Attributes

static DialogBase Main
 
static Dictionary< string, DialogBaseDialogs = new Dictionary<string, DialogBase>()
 

Protected Member Functions

virtual void Awake ()
 
virtual void OnDestroy ()
 
virtual void OnApplicationFocus (bool focus)
 
virtual void initialize (string title, string[] texts, Action< DialogResult > onClose, DialogButtons buttons, string[] options, DialogResult selection, DialogInput input, string inputValue, Sprite image)
 
virtual bool tryContinue ()
 
virtual void setResult (DialogResult result)
 
virtual void onOpening ()
 
virtual void onContinue ()
 
virtual void onWaiting ()
 
virtual void onClosing (DialogResult result)
 
virtual void onClosed (DialogResult result)
 
virtual void initializeTimeline ()
 
virtual void clearTimeline (DialogResult result)
 
virtual void setTimelineProgress (float value)
 
virtual void setTimelineWait (DialogButtons buttons, DialogResult selection)
 
virtual void setTimelineOpacity (float value)
 

Protected Attributes

Action< DialogResult > _onClose
 
bool _isOptionsDialog
 
DialogButtons _buttons
 
DialogResult _selection
 
DialogBehaviour _currentBehaviour
 
PlayableDirector _awaitingDirector
 
double? _targetYesOk
 
double? _targetNo
 
double? _targetCancel
 

Properties

static bool IsDialogVisible [get]
 
static DialogBase VisibleDialog [get]
 
DialogBehaviour CurrentBehaviour [get]
 
bool IsTimelineWaiting [get]
 
bool IsTimelineActive [get]
 
string TimelineFallbackTitle [get, set]
 
string TimelineFallbackContent [get, set]
 
string TimelineTitle [get]
 
string TimelineContent [get]
 
virtual DialogResult DialogResult [get, protected set]
 
string InputString [get]
 
int InputInteger [get]
 
float InputFloat [get]