Expose last axis move input mode to Blueprints

This commit is contained in:
Steve Streeting 2022-02-01 17:03:41 +00:00
parent 2e841e3e3d
commit cff7282ae5

View File

@ -171,6 +171,9 @@ public:
/// Gets the device where the most recent button press happened /// Gets the device where the most recent button press happened
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
EInputMode GetLastInputButtonPressed(int PlayerIndex = 0) const { return InputDetector->GetLastButtonInputMode(PlayerIndex); } EInputMode GetLastInputButtonPressed(int PlayerIndex = 0) const { return InputDetector->GetLastButtonInputMode(PlayerIndex); }
/// Gets the device where the most recent axis move happened
UFUNCTION(BlueprintCallable)
EInputMode GetLastInputAxisMoved(int PlayerIndex = 0) const { return InputDetector->GetLastAxisInputMode(PlayerIndex); }
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
bool LastInputWasGamePad(int PlayerIndex = 0) const { return GetLastInputModeUsed(PlayerIndex) == EInputMode::Gamepad; } bool LastInputWasGamePad(int PlayerIndex = 0) const { return GetLastInputModeUsed(PlayerIndex) == EInputMode::Gamepad; }