Loading...
Searching...
No Matches
AdventureCore.DialogElement Class Reference

Detailed Description

dialog implementation to be used with the new UI Toolkit

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

Inheritance diagram for AdventureCore.DialogElement:
AdventureCore.DialogBase

Public Member Functions

override void Focus ()
 
- Public Member Functions inherited from AdventureCore.DialogBase
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 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)
 

Public Attributes

float CharacterDelay
 
float FadeDuration
 
- Public Attributes inherited from AdventureCore.DialogBase
string Key
 
bool IsVisible
 
UnityEvent Opening
 
UnityEvent Continuing
 
UnityEvent Waiting
 
UnityEvent< DialogResult > Closing
 
UnityEvent< DialogResult > Closed
 

Protected Member Functions

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

Protected Attributes

UIDocument _document
 
Label _titleLabel
 
Label _contentLabel
 
VisualElement _image
 
VisualElement _characterDelayControls
 
TextField _inputField
 
Button _okButton
 
Button _yesButton
 
Button _noButton
 
Button _cancelButton
 
VisualElement _optionsParent
 
Coroutine _delayContentRoutine
 
VisualElement _selectedObject
 
int _textIndex
 
string[] _texts
 
- Protected Attributes inherited from AdventureCore.DialogBase
Action< DialogResult > _onClose
 
bool _isOptionsDialog
 
DialogButtons _buttons
 
DialogResult _selection
 
DialogBehaviour _currentBehaviour
 
PlayableDirector _awaitingDirector
 
double? _targetYesOk
 
double? _targetNo
 
double? _targetCancel
 

Properties

override string InputString [get]
 
override int InputInteger [get]
 
override float InputFloat [get]
 
- Properties inherited from AdventureCore.DialogBase
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]
 

Additional Inherited Members

- Static Public Member Functions inherited from AdventureCore.DialogBase
static DialogBase GetDialog (string key)
 
- Static Public Attributes inherited from AdventureCore.DialogBase
static DialogBase Main
 
static Dictionary< string, DialogBaseDialogs = new Dictionary<string, DialogBase>()
 

Member Function Documentation

◆ clearTimeline()

override void AdventureCore.DialogElement.clearTimeline ( DialogResult result)
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ Focus()

override void AdventureCore.DialogElement.Focus ( )
inlinevirtual

Reimplemented from AdventureCore.DialogBase.

◆ initialize()

override void AdventureCore.DialogElement.initialize ( string title,
string[] texts,
Action< DialogResult > onClose,
DialogButtons buttons,
string[] options,
DialogResult selection,
DialogInput input,
string inputValue,
Sprite image )
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ initializeTimeline()

override void AdventureCore.DialogElement.initializeTimeline ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ setResult()

override void AdventureCore.DialogElement.setResult ( DialogResult result)
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ setTimelineOpacity()

override void AdventureCore.DialogElement.setTimelineOpacity ( float value)
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ setTimelineProgress()

override void AdventureCore.DialogElement.setTimelineProgress ( float value)
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ setTimelineWait()

override void AdventureCore.DialogElement.setTimelineWait ( DialogButtons buttons,
DialogResult selection )
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ tryContinue()

override bool AdventureCore.DialogElement.tryContinue ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.