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

Detailed Description

dialog implementation to be used with TextMeshPro and Unity UI

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

Inheritance diagram for AdventureCore.DialogTMP:
AdventureCore.DialogBase

Public Member Functions

void OnSubmit (BaseEventData eventData)
 
void OnCancel (BaseEventData eventData)
 
void OnPointerClick (PointerEventData eventData)
 
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

TMP_Text Title
 
TMP_Text Content
 
Image Image
 
float CharacterDelay
 
CanvasGroup CharacterDelayControls
 
TMP_InputField Input
 
Button Ok
 
Button Yes
 
Button No
 
Button Cancel
 
Button OptionPrefab
 
Transform OptionParent
 
CanvasGroup FadeGroup
 
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

override void Awake ()
 
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 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)
 

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

Member Function Documentation

◆ Awake()

override void AdventureCore.DialogTMP.Awake ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ clearTimeline()

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

Reimplemented from AdventureCore.DialogBase.

◆ Focus()

override void AdventureCore.DialogTMP.Focus ( )
inlinevirtual

Reimplemented from AdventureCore.DialogBase.

◆ initialize()

override void AdventureCore.DialogTMP.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.DialogTMP.initializeTimeline ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.

◆ setResult()

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

Reimplemented from AdventureCore.DialogBase.

◆ setTimelineOpacity()

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

Reimplemented from AdventureCore.DialogBase.

◆ setTimelineProgress()

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

Reimplemented from AdventureCore.DialogBase.

◆ setTimelineWait()

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

Reimplemented from AdventureCore.DialogBase.

◆ tryContinue()

override bool AdventureCore.DialogTMP.tryContinue ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.DialogBase.