|
|
|
|
| #pragma once
|
|
|
| #include "CommonUserWidget.h"
|
| #include "LyraSimulatedInputWidget.generated.h"
|
|
|
| #define UE_API LYRAGAME_API
|
|
|
| class UEnhancedInputLocalPlayerSubsystem;
|
| class UInputAction;
|
| class UCommonHardwareVisibilityBorder;
|
| class UEnhancedPlayerInput;
|
|
|
| |
| |
| |
|
|
| UCLASS(MinimalAPI, meta=( DisplayName="Lyra Simulated Input Widget" ))
|
| class ULyraSimulatedInputWidget : public UCommonUserWidget
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
|
|
| UE_API ULyraSimulatedInputWidget(const FObjectInitializer& ObjectInitializer);
|
|
|
|
|
| #if WITH_EDITOR
|
| UE_API virtual const FText GetPaletteCategory() override;
|
| #endif
|
|
|
|
|
|
|
| UE_API virtual void NativeConstruct() override;
|
| UE_API virtual void NativeDestruct() override;
|
| UE_API virtual FReply NativeOnTouchEnded(const FGeometry& InGeometry, const FPointerEvent& InGestureEvent) override;
|
|
|
|
|
|
|
| UFUNCTION(BlueprintCallable)
|
| UE_API UEnhancedInputLocalPlayerSubsystem* GetEnhancedInputSubsystem() const;
|
|
|
|
|
| UE_API UEnhancedPlayerInput* GetPlayerInput() const;
|
|
|
|
|
| UFUNCTION(BlueprintCallable)
|
| const UInputAction* GetAssociatedAction() const { return AssociatedAction; }
|
|
|
|
|
| UFUNCTION(BlueprintCallable)
|
| FKey GetSimulatedKey() const { return KeyToSimulate; }
|
|
|
| |
| |
| |
|
|
| UFUNCTION(BlueprintCallable)
|
| UE_API void InputKeyValue(const FVector& Value);
|
|
|
| |
| |
| |
|
|
| UFUNCTION(BlueprintCallable)
|
| UE_API void InputKeyValue2D(const FVector2D& Value);
|
|
|
| UFUNCTION(BlueprintCallable)
|
| UE_API void FlushSimulatedInput();
|
|
|
| protected:
|
|
|
|
|
| UE_API void QueryKeyToSimulate();
|
|
|
|
|
| UFUNCTION()
|
| UE_API void OnControlMappingsRebuilt();
|
|
|
|
|
| UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
|
| TObjectPtr<UCommonHardwareVisibilityBorder> CommonVisibilityBorder = nullptr;
|
|
|
|
|
| UPROPERTY(EditAnywhere, BlueprintReadOnly)
|
| TObjectPtr<const UInputAction> AssociatedAction = nullptr;
|
|
|
|
|
| UPROPERTY(BlueprintReadOnly, EditAnywhere)
|
| FKey FallbackBindingKey = EKeys::Gamepad_Right2D;
|
|
|
|
|
| FKey KeyToSimulate;
|
| };
|
|
|
| #undef UE_API
|
|
|