Gorilla.UI.Dialogue.Overlay
Unit Gorilla.UI.Dialogue.Overlay.pasClasses
- TGorillaDialogueOverlay = class ( TControl )
- TGorillaDialogueTextOverlay = class ( TGorillaDialogueOverlay )
- TGorillaDialogueQuestionOverlay = class ( TGorillaDialogueTextOverlay )
- TGorillaDialogueAnswerOverlay = class ( TGorillaDialogueTextOverlay )
- TGorillaDialogueFlowOverlay = class ( TGorillaDialogueTextOverlay )
- TGorillaDialogueHUD = class ( TGorillaDialogueOverlay )
TGorillaDialogueOverlay
Basic overlay control for dialogue item output.
Remarks
Do not use this component explicitly. Prefer to use the specialized extension for text, question, answer and flow.Ancestors
Members
Fields
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetItem
(
const
AValue :
TGorillaDialogueCustomItem
)
;
virtual;
Updates the internal item link.
Properties
TGorillaDialogueTextOverlay
Basic text overlay for displaying text elements.
This is only the basis for items like question, answer and flow.
Ancestors
Members
Fields
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure DoSetText
(
)
;
abstract virtual;
This abstract method updates the embedded text label depending on the linked item.
- protected procedure DoSetCharacterText
(
)
;
abstract virtual;
This abstract method updates the embedded character label depending on the linked item.
- protected procedure DoAddCharacterTextLabel
(
)
;
virtual;
This method adds the character text label to the overlay. By default this method is not called.
Properties
TGorillaDialogueQuestionOverlay
Basic question overlay for displaying questions.
Remarks
This component automatically contains overlays for the question itself and for each answer.Ancestors
Members
Fields
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetItem
(
const
AValue :
TGorillaDialogueCustomItem
)
;
override;
Updates the internal item link.
- protected procedure DoSetText
(
)
;
override;
This method updates the embedded text label depending on the linked item.
- protected procedure DoSetCharacterText
(
)
;
override;
This method updates the embedded character label depending on the linked item.
- public procedure ClearAnswers
(
)
;
virtual;
Removes all answer overlays from the question overlay.
TGorillaDialogueAnswerOverlay
Basic answer overlay for displaying an answer of a specific question.
Remarks
This component, in most cases, is automatically created by the question overlay.Ancestors
Members
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetItem
(
const
AValue :
TGorillaDialogueCustomItem
)
;
override;
Updates the internal item link.
- protected procedure DoSetText
(
)
;
override;
This method updates the embedded text label depending on the linked item.
- protected procedure DoOnClick
(
ASender :
TObject
)
;
virtual;
This method will automatically be executed if user clicked on the overlay.
- protected procedure DoSetCharacterText ( ) ; override;
TGorillaDialogueFlowOverlay
Basic text flow overlay for displaying an floating text.
Ancestors
Members
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetItem
(
const
AValue :
TGorillaDialogueCustomItem
)
;
override;
Updates the internal item link.
- protected procedure DoSetText
(
)
;
override;
This method updates the embedded text label depending on the linked item.
- protected procedure DoSetCharacterText
(
)
;
override;
This method updates the embedded character label depending on the linked item.
- protected procedure DoOnClick
(
ASender :
TObject
)
;
virtual;
This method will automatically be executed if user clicked on the overlay.
TGorillaDialogueHUD
Basic head up display for a dialogue.
Remarks
The complete dialogue display will be handled inside of this component.Ancestors
Members
Fields
- protected FDialogue :
TGorillaDialogue
- protected FOverlays :
TObjectList<Gorilla.UI.Dialogue.Overlay.TGorillaDialogueOverlay>
- protected FTimers :
TObjectList<FMX.Types.TTimer>
- protected FViewport :
TComponent
- protected FAudioManager :
TObject
- protected FAudioChannels :
TAudioChannels
- protected FOnStart :
TNotifyEvent
- protected FOnStop :
TNotifyEvent
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetViewport ( const AValue : TComponent ) ; virtual;
- protected procedure SetAudioManager ( const AValue : TObject ) ; virtual;
- protected procedure SetDialogue
(
const
AValue :
TGorillaDialogue
)
;
virtual;
Sets the internal dialogue link.
- protected procedure DoExecuteEvent ( const AEvent : TGorillaDialogueItemEvent; const AScope : TObject ) ; virtual;
- protected procedure ExecuteEvent
(
const
AEvent :
TGorillaDialogueItemEvent; const
AScope :
TObject
)
;
virtual;
Executes a specific dialogue item event.
- protected procedure ExecuteSubEvent
(
const
AEvent :
TGorillaDialogueItemEvent; const
AScope :
TObject
)
;
virtual;
Executes a specific dialogue item event.
- protected procedure StopEvent
(
const
AEvent :
TGorillaDialogueItemEvent; const
AScope :
TObject
)
;
Stops a specific event from execution. This method is used in the OnItemEventEnd callback to stop audio playback while an item was skipped.
- protected procedure DoOnEventTimer
(
ASender :
TObject
)
;
virtual;
This is the callback method for defined "timer" item events. It will automatically remove the timer on callback. It also will automatically call the linked event by the ExecuteEvent() method.
- protected procedure DoOnAnimationFinished
(
ASender :
TObject
)
;
virtual;
This is the internal callback method when a TAnimation is finished.
- protected procedure DoOnBeginDialogueItem
(
const
AItem :
TGorillaDialogueItem; const
AItems :
TArray<Gorilla.Utils.Dialogue.System.TGorillaDialogueItem>
)
;
virtual;
This is the internal callback method when an item is about to be displayed.
- protected procedure DoOnEndDialogueItem
(
const
AItem :
TGorillaDialogueItem
)
;
virtual;
This is the internal callback method, when an item is about to be stopped.
- protected procedure DoOnBeginDialogueItemEvent
(
const
AEvent :
TGorillaDialogueItemEvent; const
AScope :
TObject; var
AHandled :
Boolean
)
;
virtual;
This is the internal callback method when an event is about to be started.
- protected procedure DoOnEndDialogueItemEvent
(
const
AEvent :
TGorillaDialogueItemEvent; const
AScope :
TObject
)
;
virtual;
This is the internal callback method when an event is about to be stopped.
- protected procedure DoOnStartDialogue
(
const
ADialogue :
TGorillaDialogue; const
AItems :
TArray<Gorilla.Utils.Dialogue.System.TGorillaDialogueItem>
)
;
virtual;
This is the internal callback method when a dialogue was started.
- protected procedure DoOnStopDialogue
(
const
ADialogue :
TGorillaDialogue
)
;
virtual;
This is the internal callback method when a dialogue was stopped.
- protected procedure DoShowItem
(
const
AItem :
TGorillaDialogueItem; const
ADoStartItem :
Boolean
)
;
virtual;
Visualizes a specific item as overlay component inside of the HUD. If the DoStartItem argument is set, the method will automatically start execution of the provided item.
- protected procedure DoShowItems
(
const
AItems :
TArray<Gorilla.Utils.Dialogue.System.TGorillaDialogueItem>
)
;
virtual;
Iterates through the given item list an executes the DoShowItem() method for each element.
- protected procedure DoStartItems
(
const
AItems :
TArray<Gorilla.Utils.Dialogue.System.TGorillaDialogueItem>
)
;
virtual;
Iterates through the given dialogue item list and starts all items.
- public procedure Start
(
)
;
virtual;
Starts the applied dialogue.
- public procedure Stop
(
)
;
virtual;
Stops a currently active dialogue.
- public procedure Clear
(
const
AClearAll :
Boolean
=
False
)
;
virtual;
Clears all currently available overlays from the HUD component.
- public procedure ClearTimers
(
const
AClearAll :
Boolean
)
;
virtual;
Clears all timers. If AClearAll is set to false, the method will only clear local timers.
- public function FindElement
(
const
AParent :
TFmxObject; const
AName :
string; const
ADeep :
Boolean
)
: TFmxObject
;
virtual;
Tries to find a specific component identified by its name.