v1.2.26 |
Documentation for the Unreal C++ Plugin
|
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>
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. | |
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.
UPixoVRLongHoldComponent::UPixoVRLongHoldComponent | ( | ) |
Definition at line 5 of file PixoVRLongHoldComponent.cpp.
|
BlueprintCallable |
Executes the long hold functionality.
LongHoldFunction | The function to execute when the button is held for the specified duration. |
UFUNCTION(BlueprintCallable, Category = "PixoVR")
Definition at line 41 of file PixoVRLongHoldComponent.cpp.
|
private |
|
BlueprintPureBlueprintCallable |
Gets the current time of the long hold.
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "PixoVR")
Definition at line 67 of file PixoVRLongHoldComponent.cpp.
|
BlueprintPureBlueprintCallable |
Gets the current time percentage of the long hold.
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "PixoVR")
Definition at line 58 of file PixoVRLongHoldComponent.cpp.
|
BlueprintPureBlueprintCallable |
Gets the needed time for a successful long hold.
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "PixoVR")
Definition at line 72 of file PixoVRLongHoldComponent.cpp.
|
BlueprintPureBlueprintCallable |
Checks if a short press is valid.
[out] | IsShortPressValid | True if a short press is valid, false otherwise. |
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "PixoVR")
Definition at line 53 of file PixoVRLongHoldComponent.cpp.
|
BlueprintCallable |
Stops the long hold functionality.
UFUNCTION(BlueprintCallable, Category = "PixoVR")
Definition at line 48 of file PixoVRLongHoldComponent.cpp.
|
overridevirtual |
Definition at line 15 of file PixoVRLongHoldComponent.cpp.
|
protectedBlueprintReadWrite |
UPROPERTY(BlueprintReadWrite, Category = "PixoVR")
The current state of the button.
Definition at line 128 of file PixoVRLongHoldComponent.h.
|
private |
The current time elapsed during the long hold.
Definition at line 131 of file PixoVRLongHoldComponent.h.
|
private |
The event to execute when the long hold is released.
Definition at line 132 of file PixoVRLongHoldComponent.h.
|
protectedEditDefaultsOnlyBlueprintReadWrite |
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PixoVR")
The maximum duration for a short press.
Definition at line 122 of file PixoVRLongHoldComponent.h.
|
protectedEditDefaultsOnlyBlueprintReadWrite |
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PixoVR")
The required duration for a successful long hold.
Definition at line 115 of file PixoVRLongHoldComponent.h.