A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
AWidgetController Class Reference

AActor class representing a widget controller that manages widget functionality. More...

#include <WidgetController.h>

Inheritance diagram for AWidgetController:
[legend]

Public Member Functions

void CloseWidget ()
 UFUNCTION(BlueprintCallable, Category = "WidgetController")
 
FVector GetWidgetLocation ()
 UFUNCTION(BlueprintCallable, Category = "WidgetController")
 
void InitWidget (UBasicWidgetInfo *WidgetInfo)
 UFUNCTION(BlueprintCallable, Category = "WidgetController")
 
bool IsWidgetInited ()
 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "WidgetController")
 

Public Attributes

UArrowComponent * ArrowDirection
 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
 
UBoxComponentBoxForRotate
 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
 
UBoxComponentBoxForSpawn
 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
 
UBoxComponentBoxForTouch
 UPROPERTY(VisibleAnywhere, Replicated, BlueprintReadWrite, Category = "Components")
 
UTimelineComponent * OpenCloseTimeline
 UPROPERTY(VisibleAnywhere, Replicated, BlueprintReadWrite, Category = "Components")
 
UWidgetComponentWidgetComponent
 UPROPERTY(VisibleAnywhere, Replicated, BlueprintReadWrite, Category = "Components")
 
USceneComponentWidgetScene
 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
 

Protected Member Functions

 AWidgetController ()
 
void ActivateCurrentWidget ()
 UFUNCTION(BlueprintCallable, Category = "Widget")
 
virtual void BeginPlay () override
 
bool CanRotate ()
 UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Widget")
 
void CloseWidgetAnim ()
 UFUNCTION(BlueprintCallable, Category = "Widget")
 
void DeactivateCurrentWidget ()
 UFUNCTION(BlueprintCallable, Category = "Widget")
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 
void InternalCloseWidget ()
 
void OpenWidgetAnim ()
 UFUNCTION(BlueprintCallable, Category = "Widget")
 
void StartLookAt ()
 UFUNCTION(BlueprintCallable, Category = "Widget")
 
void StopLookAt ()
 UFUNCTION(BlueprintCallable, Category = "Widget")
 
virtual void Tick (float DeltaTime) override
 

Protected Attributes

USoundBase * CloseSound
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FVector FinalLocation
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")
 
FRotator FinalRotation
 UPROPERTY(BlueprintReadOnly, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")
 
UCurveFloat * OpenCloseFloatCurve
 UPROPERTY(EditDefaultsOnly, Category = "Widget")
 
USoundBase * OpenSound
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FVector StartLocation
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")
 
FRotator StartRotation
 UPROPERTY(BlueprintReadOnly, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")
 
FOnTimelineEvent TimelineFinished
 This delegate will be fired when the timeline reaches the end.
 
FOnTimelineFloat TimelinePostUpdate
 This delegate will be fired to be informed when the timeline has a new update.
 

Private Member Functions

void BeginOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 UFUNCTION()
 
void EndOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 UFUNCTION()
 
 GENERATED_BODY ()
 
void HandleTimelineFinished ()
 UFUNCTION()
 
void HandleTimeLineFloat (float Value)
 UFUNCTION()
 
void InitBasicWidget (UBasicWidget *BasicWidget, UBasicWidgetInfo *WidgetInfo)
 
void InitWidgetLocally (UBasicWidgetInfo *WidgetInfo)
 
void TouchBeginOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
 UFUNCTION()
 
void TouchEndOverlap (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
 UFUNCTION()
 

Private Attributes

bool bFinalLocationPendingChange = false
 UPROPERTY()
 
bool bRotateAllowed = true
 Is allowed the widget rotates to character or not.
 
bool bSoundAllowed = true
 
bool bStartLookAtAllowed = false
 Is allowed the widget rotates to character or not.
 
UBasicWidgetCurrentWidget = nullptr
 UPROPERTY()
 
TArray< UPrimitiveComponent * > OverlapArray
 UPROPERTY()
 
TArray< UBasicWidgetInfo * > WidgetCache
 UPROPERTY()
 
TDoubleLinkedList< UBasicWidget * > WidgetQueue
 

Detailed Description

AActor class representing a widget controller that manages widget functionality.

Todo
Investigate all functionality and remove unnecessary.

UCLASS()

Definition at line 23 of file WidgetController.h.

Constructor & Destructor Documentation

◆ AWidgetController()

AWidgetController::AWidgetController ( )
protected

Definition at line 17 of file WidgetController.cpp.

Member Function Documentation

◆ ActivateCurrentWidget()

void AWidgetController::ActivateCurrentWidget ( )
protectedBlueprintCallable

UFUNCTION(BlueprintCallable, Category = "Widget")

Definition at line 301 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ BeginOverlap()

void AWidgetController::BeginOverlap ( UPrimitiveComponent * OverlappedComponent,
AActor * OtherActor,
UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult & SweepResult )
private

UFUNCTION()

Definition at line 356 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ BeginPlay()

void AWidgetController::BeginPlay ( )
overrideprotectedvirtual

Definition at line 75 of file WidgetController.cpp.

Here is the call graph for this function:

◆ CanRotate()

bool AWidgetController::CanRotate ( )
protectedBlueprintCallableBlueprintPure

UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Widget")

Is the widget can rotate to character or not.

Definition at line 296 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ CloseWidget()

void AWidgetController::CloseWidget ( )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "WidgetController")

Definition at line 232 of file WidgetController.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloseWidgetAnim()

void AWidgetController::CloseWidgetAnim ( )
protectedBlueprintCallable

UFUNCTION(BlueprintCallable, Category = "Widget")

Launch close animation.

Definition at line 280 of file WidgetController.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeactivateCurrentWidget()

void AWidgetController::DeactivateCurrentWidget ( )
protectedBlueprintCallable

UFUNCTION(BlueprintCallable, Category = "Widget")

Definition at line 310 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ EndOverlap()

void AWidgetController::EndOverlap ( UPrimitiveComponent * OverlappedComponent,
AActor * OtherActor,
UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex )
private

UFUNCTION()

Definition at line 364 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ GENERATED_BODY()

AWidgetController::GENERATED_BODY ( )
private

◆ GetLifetimeReplicatedProps()

void AWidgetController::GetLifetimeReplicatedProps ( TArray< FLifetimeProperty > & OutLifetimeProps) const
overrideprotectedvirtual

Definition at line 319 of file WidgetController.cpp.

◆ GetWidgetLocation()

FVector AWidgetController::GetWidgetLocation ( )
inlineBlueprintCallable

UFUNCTION(BlueprintCallable, Category = "WidgetController")

Definition at line 55 of file WidgetController.h.

◆ HandleTimelineFinished()

void AWidgetController::HandleTimelineFinished ( )
private

UFUNCTION()

Use this function to handle the finished event.

Definition at line 343 of file WidgetController.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleTimeLineFloat()

void AWidgetController::HandleTimeLineFloat ( float Value)
private

UFUNCTION()

Use this function to handle the update of the timeline.

Definition at line 330 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ InitBasicWidget()

void AWidgetController::InitBasicWidget ( UBasicWidget * BasicWidget,
UBasicWidgetInfo * WidgetInfo )
private

Definition at line 179 of file WidgetController.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitWidget()

void AWidgetController::InitWidget ( UBasicWidgetInfo * WidgetInfo)
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "WidgetController")

Definition at line 129 of file WidgetController.cpp.

Here is the call graph for this function:

◆ InitWidgetLocally()

void AWidgetController::InitWidgetLocally ( UBasicWidgetInfo * WidgetInfo)
private

Definition at line 137 of file WidgetController.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InternalCloseWidget()

void AWidgetController::InternalCloseWidget ( )
protected

Definition at line 245 of file WidgetController.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsWidgetInited()

bool AWidgetController::IsWidgetInited ( )
BlueprintCallableBlueprintPure

UFUNCTION(BlueprintCallable, BlueprintPure, Category = "WidgetController")

Definition at line 237 of file WidgetController.cpp.

◆ OpenWidgetAnim()

void AWidgetController::OpenWidgetAnim ( )
protectedBlueprintCallable

UFUNCTION(BlueprintCallable, Category = "Widget")

Definition at line 275 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ StartLookAt()

void AWidgetController::StartLookAt ( )
protectedBlueprintCallable

UFUNCTION(BlueprintCallable, Category = "Widget")

Allow rotate the widget to the character.

Definition at line 286 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ StopLookAt()

void AWidgetController::StopLookAt ( )
protectedBlueprintCallable

UFUNCTION(BlueprintCallable, Category = "Widget")

Prohibit rotate the widget to the character.

Definition at line 291 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ Tick()

void AWidgetController::Tick ( float DeltaTime)
overrideprotectedvirtual

Definition at line 98 of file WidgetController.cpp.

Here is the call graph for this function:

◆ TouchBeginOverlap()

void AWidgetController::TouchBeginOverlap ( UPrimitiveComponent * OverlappedComponent,
AActor * OtherActor,
UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult & SweepResult )
private

UFUNCTION()

Definition at line 212 of file WidgetController.cpp.

Here is the caller graph for this function:

◆ TouchEndOverlap()

void AWidgetController::TouchEndOverlap ( UPrimitiveComponent * OverlappedComponent,
AActor * OtherActor,
UPrimitiveComponent * OtherComp,
int32 OtherBodyIndex )
private

UFUNCTION()

Definition at line 222 of file WidgetController.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ ArrowDirection

UArrowComponent* AWidgetController::ArrowDirection
BlueprintReadWriteVisibleAnywhere

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")

Definition at line 210 of file WidgetController.h.

◆ bFinalLocationPendingChange

bool AWidgetController::bFinalLocationPendingChange = false
private

UPROPERTY()

If widget remains the same but position changed

Definition at line 271 of file WidgetController.h.

◆ BoxForRotate

UBoxComponent* AWidgetController::BoxForRotate
BlueprintReadWriteVisibleAnywhere

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")

Definition at line 172 of file WidgetController.h.

◆ BoxForSpawn

UBoxComponent* AWidgetController::BoxForSpawn
BlueprintReadWriteVisibleAnywhere

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")

Definition at line 165 of file WidgetController.h.

◆ BoxForTouch

UBoxComponent* AWidgetController::BoxForTouch
BlueprintReadWriteReplicatedVisibleAnywhere

UPROPERTY(VisibleAnywhere, Replicated, BlueprintReadWrite, Category = "Components")

Definition at line 203 of file WidgetController.h.

◆ bRotateAllowed

bool AWidgetController::bRotateAllowed = true
private

Is allowed the widget rotates to character or not.

Definition at line 265 of file WidgetController.h.

◆ bSoundAllowed

bool AWidgetController::bSoundAllowed = true
private

Definition at line 266 of file WidgetController.h.

◆ bStartLookAtAllowed

bool AWidgetController::bStartLookAtAllowed = false
private

Is allowed the widget rotates to character or not.

Definition at line 264 of file WidgetController.h.

◆ CloseSound

USoundBase* AWidgetController::CloseSound
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 261 of file WidgetController.h.

◆ CurrentWidget

UBasicWidget* AWidgetController::CurrentWidget = nullptr
private

UPROPERTY()

Definition at line 281 of file WidgetController.h.

◆ FinalLocation

FVector AWidgetController::FinalLocation
protectedEditAnywhereBlueprintReadWriteReplicated

UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")

Holds spawn location.

Definition at line 219 of file WidgetController.h.

◆ FinalRotation

FRotator AWidgetController::FinalRotation
protectedBlueprintReadOnlyReplicated

UPROPERTY(BlueprintReadOnly, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")

Holds spawn rotation

Definition at line 239 of file WidgetController.h.

◆ OpenCloseFloatCurve

UCurveFloat* AWidgetController::OpenCloseFloatCurve
protectedEditDefaultsOnly

UPROPERTY(EditDefaultsOnly, Category = "Widget")

This curve will be used when activating/deactivating the widget.

Definition at line 245 of file WidgetController.h.

◆ OpenCloseTimeline

UTimelineComponent* AWidgetController::OpenCloseTimeline
BlueprintReadWriteReplicatedVisibleAnywhere

UPROPERTY(VisibleAnywhere, Replicated, BlueprintReadWrite, Category = "Components")

This timeline will be used when activating/deactivating the widget.

Definition at line 195 of file WidgetController.h.

◆ OpenSound

USoundBase* AWidgetController::OpenSound
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 255 of file WidgetController.h.

◆ OverlapArray

TArray<UPrimitiveComponent*> AWidgetController::OverlapArray
private

UPROPERTY()

Holds array of components which overlapped with BoxForRotate

Definition at line 276 of file WidgetController.h.

◆ StartLocation

FVector AWidgetController::StartLocation
protectedEditAnywhereBlueprintReadWriteReplicated

UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")

Holds start location from will be moved the widget to spawn location.

Definition at line 226 of file WidgetController.h.

◆ StartRotation

FRotator AWidgetController::StartRotation
protectedBlueprintReadOnlyReplicated

UPROPERTY(BlueprintReadOnly, Replicated, Meta = (ExposeOnSpawn = true), Category = "Widget")

Holds start rotation from will be moved the widget to spawn location.

Definition at line 233 of file WidgetController.h.

◆ TimelineFinished

FOnTimelineEvent AWidgetController::TimelineFinished
protected

This delegate will be fired when the timeline reaches the end.

Definition at line 248 of file WidgetController.h.

◆ TimelinePostUpdate

FOnTimelineFloat AWidgetController::TimelinePostUpdate
protected

This delegate will be fired to be informed when the timeline has a new update.

Definition at line 247 of file WidgetController.h.

◆ WidgetCache

TArray<UBasicWidgetInfo*> AWidgetController::WidgetCache
private

UPROPERTY()

Definition at line 288 of file WidgetController.h.

◆ WidgetComponent

UWidgetComponent* AWidgetController::WidgetComponent
BlueprintReadWriteReplicatedVisibleAnywhere

UPROPERTY(VisibleAnywhere, Replicated, BlueprintReadWrite, Category = "Components")

Definition at line 187 of file WidgetController.h.

◆ WidgetQueue

TDoubleLinkedList<UBasicWidget*> AWidgetController::WidgetQueue
private

Definition at line 284 of file WidgetController.h.

◆ WidgetScene

USceneComponent* AWidgetController::WidgetScene
BlueprintReadWriteVisibleAnywhere

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")

Definition at line 179 of file WidgetController.h.


The documentation for this class was generated from the following files: