Space Plunder
Loading...
Searching...
No Matches
SteamInputLib.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6// #include "SteamRequests.h"
7#include <steam/steam_api.h>
8#include "OnlineSubsystemSteam.h"
9#include "SteamInputData.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include "SteamInputLib.generated.h"
12
16UCLASS()
17class STATSINTEGRATION_API USteamInputLib : public UBlueprintFunctionLibrary
18{
19 GENERATED_BODY()
20
21public:
22
23 // // Enumerate currently connected Steam Input enabled devices - developers can opt in controller by type (ex: Xbox/Playstation/etc) via
24 // // the Steam Input settings in the Steamworks site or users can opt-in in their controller settings in Steam.
25 // // handlesOut should point to a STEAM_INPUT_MAX_COUNT sized array of InputHandle_t handles
26 // // Returns the number of handles written to handlesOut
27 // UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
28 // static int32 GetConnectedControllers();
29
30 // Trigger a vibration event on supported controllers - Steam will translate these commands into haptic pulses for Steam Controllers
31 UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
32 static void TriggerVibration(const FSteamInputHandle InputHandle, const int32 LeftSpeed, const int32 RightSpeed);
33
34 // Trigger a vibration event on supported controllers including Xbox trigger impulse rumble - Steam will translate these commands into haptic pulses for Steam Controllers
35 UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
36 static void TriggerVibrationExtended(const FSteamInputHandle InputHandle, const int32 LeftSpeed, const int32 RightSpeed, const int32 LeftTriggerSpeed, const int32 RightTriggerSpeed);
37
38 // // Send a haptic pulse, works on Steam Deck and Steam Controller devices
39 // UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
40 // static void TriggerSimpleHapticEvent(const FSteamInputHandle InputHandle, EControllerHapticLocation eHapticLocation, uint8 Intensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB);
41
42 // // Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
43 // // If the user is not in Big Picture Mode it will open up the binding in a new window
44 // UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
45 // static bool ShowBindingPanel(const FSteamInputHandle InputHandle );
46
47 // Returns the input type for a particular handle - unlike EInputActionOrigin which update with Steam and may return unrecognized values
48 // ESteamInputType will remain static and only return valid values from your SDK version
49 UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
50 static ESteamLibInputType GetInputTypeForHandle(const FSteamInputHandle InputHandle);
51
52 // Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions
53 // to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input
54 UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
55 static FSteamInputHandle GetControllerForGamepadIndex(const int32 Index);
56
57 // Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index
58 UFUNCTION(BlueprintCallable, Category = "Simple Steam Input")
59 static int32 GetGamepadIndexForController(const FSteamInputHandle InputHandle);
60
61 static ESteamLibInputType ConvertSteamInputType(const ESteamInputType InputType);
62
63};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
ESteamLibInputType
Definition SteamInputData.h:13
Definition SteamInputLib.h:18
Definition SteamInputData.h:39