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

Component for handling long hold functionality in PixoVR. Allows execution of a function when a button is held down for a specified duration. More...

#include <PixoVRLongHoldComponent.h>

Inheritance diagram for UPixoVRLongHoldComponent:
[legend]

Public Member Functions

 UPixoVRLongHoldComponent ()
 
void ExecuteLongHold (const FOnLongHoldReleased &LongHoldFunction)
 Executes the long hold functionality.
 
float GetCurrentTime () const
 Gets the current time of the long hold.
 
float GetCurrentTimePercentage () const
 Gets the current time percentage of the long hold.
 
float GetNeededTime () const
 Gets the needed time for a successful long hold.
 
void IsShortPressValid (bool &IsShortPressValid)
 Checks if a short press is valid.
 
void StopLongHold ()
 Stops the long hold functionality.
 
virtual void TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 

Protected Attributes

EHoldingState ButtonState
 UPROPERTY(BlueprintReadWrite, Category = "PixoVR")
 
float MaxShortPressTime
 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PixoVR")
 
float NeededTime
 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PixoVR")
 

Private Member Functions

 GENERATED_BODY ()
 

Private Attributes

float CurrentTime
 The current time elapsed during the long hold.
 
FOnLongHoldReleased LongHoldReleasedEvent
 The event to execute when the long hold is released.
 

Detailed Description

Component for handling long hold functionality in PixoVR. Allows execution of a function when a button is held down for a specified duration.

UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))

Definition at line 37 of file PixoVRLongHoldComponent.h.

Constructor & Destructor Documentation

◆ UPixoVRLongHoldComponent()

UPixoVRLongHoldComponent::UPixoVRLongHoldComponent ( )

Definition at line 5 of file PixoVRLongHoldComponent.cpp.

Member Function Documentation

◆ ExecuteLongHold()

void UPixoVRLongHoldComponent::ExecuteLongHold ( const FOnLongHoldReleased & LongHoldFunction)
BlueprintCallable

Executes the long hold functionality.

Parameters
LongHoldFunctionThe function to execute when the button is held for the specified duration.

UFUNCTION(BlueprintCallable, Category = "PixoVR")

Definition at line 41 of file PixoVRLongHoldComponent.cpp.

◆ GENERATED_BODY()

UPixoVRLongHoldComponent::GENERATED_BODY ( )
private

◆ GetCurrentTime()

float UPixoVRLongHoldComponent::GetCurrentTime ( ) const
BlueprintPureBlueprintCallable

Gets the current time of the long hold.

Returns
The current time in seconds.

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

Definition at line 67 of file PixoVRLongHoldComponent.cpp.

Here is the caller graph for this function:

◆ GetCurrentTimePercentage()

float UPixoVRLongHoldComponent::GetCurrentTimePercentage ( ) const
BlueprintPureBlueprintCallable

Gets the current time percentage of the long hold.

Returns
The current time percentage.

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

Definition at line 58 of file PixoVRLongHoldComponent.cpp.

Here is the caller graph for this function:

◆ GetNeededTime()

float UPixoVRLongHoldComponent::GetNeededTime ( ) const
BlueprintPureBlueprintCallable

Gets the needed time for a successful long hold.

Returns
The needed time in seconds.

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

Definition at line 72 of file PixoVRLongHoldComponent.cpp.

Here is the caller graph for this function:

◆ IsShortPressValid()

void UPixoVRLongHoldComponent::IsShortPressValid ( bool & IsShortPressValid)
BlueprintPureBlueprintCallable

Checks if a short press is valid.

Parameters
[out]IsShortPressValidTrue if a short press is valid, false otherwise.

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

Definition at line 53 of file PixoVRLongHoldComponent.cpp.

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

◆ StopLongHold()

void UPixoVRLongHoldComponent::StopLongHold ( )
BlueprintCallable

Stops the long hold functionality.

UFUNCTION(BlueprintCallable, Category = "PixoVR")

Definition at line 48 of file PixoVRLongHoldComponent.cpp.

Here is the caller graph for this function:

◆ TickComponent()

void UPixoVRLongHoldComponent::TickComponent ( float DeltaTime,
ELevelTick TickType,
FActorComponentTickFunction * ThisTickFunction )
overridevirtual

Definition at line 15 of file PixoVRLongHoldComponent.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ ButtonState

EHoldingState UPixoVRLongHoldComponent::ButtonState
protectedBlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "PixoVR")

The current state of the button.

Definition at line 128 of file PixoVRLongHoldComponent.h.

◆ CurrentTime

float UPixoVRLongHoldComponent::CurrentTime
private

The current time elapsed during the long hold.

Definition at line 131 of file PixoVRLongHoldComponent.h.

◆ LongHoldReleasedEvent

FOnLongHoldReleased UPixoVRLongHoldComponent::LongHoldReleasedEvent
private

The event to execute when the long hold is released.

Definition at line 132 of file PixoVRLongHoldComponent.h.

◆ MaxShortPressTime

float UPixoVRLongHoldComponent::MaxShortPressTime
protectedEditDefaultsOnlyBlueprintReadWrite

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PixoVR")

The maximum duration for a short press.

Definition at line 122 of file PixoVRLongHoldComponent.h.

◆ NeededTime

float UPixoVRLongHoldComponent::NeededTime
protectedEditDefaultsOnlyBlueprintReadWrite

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PixoVR")

The required duration for a successful long hold.

Definition at line 115 of file PixoVRLongHoldComponent.h.


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