4#include "Kismet/BlueprintFunctionLibrary.h"
6#include "InputRemappingNodes.generated.h"
11 GENERATED_USTRUCT_BODY()
14 FInputActionMappingStruct(
const FName& InMappingName,
const FKey& InKey,
const bool& InShift,
const bool& InCtrl,
const bool& InAlt,
const bool& InCmd) : MappingName(InMappingName), Key(InKey), Shift(InShift), Ctrl(InCtrl), Alt(InAlt), Cmd(InCmd) {}
16 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Action Mapping Struct")
19 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping Struct")
22 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping Struct")
25 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping Struct")
28 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping Struct")
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping Struct")
36 return (A.MappingName == B.MappingName) & (A.Key == B.Key) & (A.Shift == B.Shift) & (A.Ctrl == B.Ctrl) & (A.Alt == B.Alt) & (A.Cmd == B.Cmd);
64 GENERATED_USTRUCT_BODY()
65 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
67 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
69 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
70 FKey KeyboardMouseInput;
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
73 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
80 GENERATED_USTRUCT_BODY()
81 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
83 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
85 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
87 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
88 FKey KeyboardMouseInput;
89 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
91 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
93 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Customization)
100 GENERATED_USTRUCT_BODY()
103 FInputAxisMappingStruct(
const FName& InMappingName,
const FKey& InKey,
const float& InScale) : MappingName(InMappingName), Key(InKey), Scale(InScale) {}
105 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Axis Mapping Struct")
108 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Axis Mapping Struct")
111 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Axis Mapping Struct")
116 return (A.MappingName == B.MappingName) & (A.Key == B.Key) & (A.Scale == B.Scale);
127 Axis
UMETA(DisplayName =
"Axis Mapping"),
128 Action
UMETA(DisplayName =
"Action Mapping"),
129 Auto
UMETA(DisplayName =
"Auto")
135 Name
UMETA(DisplayName =
"Name"),
136 Key
UMETA(DisplayName =
"Key"),
137 Shift
UMETA(DisplayName =
"Shift"),
138 Ctrl
UMETA(DisplayName =
"Ctrl"),
139 Alt
UMETA(DisplayName =
"Alt"),
140 Cmd
UMETA(DisplayName =
"Cmd"),
141 IsNotGamepad
UMETA(DisplayName =
"Exclude Gamepad"),
142 IsNotKeyboard
UMETA(DisplayName =
"Exclude Keyboard"),
143 IsNotMouse
UMETA(DisplayName =
"Exclude Mouse Button")
149 Name
UMETA(DisplayName =
"Name"),
150 Key
UMETA(DisplayName =
"Key"),
151 Scale
UMETA(DisplayName =
"Scale"),
152 IsNotGamepad
UMETA(DisplayName =
"Exclude Gamepad"),
153 IsNotKeyboard
UMETA(DisplayName =
"Exclude Keyboard"),
154 IsNotMouse
UMETA(DisplayName =
"Exclude Mouse Button"),
155 IsNotAxis
UMETA(DisplayName =
"Exclude Axis Keys")
161 GENERATED_UCLASS_BODY()
163 UFUNCTION(BlueprintPure, meta = (DisplayName =
"Mouse Button From Pointer Event", Keywords =
"Mouse Button From Pointer Event", Tooltip =
"Gives a blueprint accesible way to get the ouse button pressed from A point event"), Category =
"Easy Input Remapping")
164 static FKey GetMouseButtonPressed(FPointerEvent Event,
bool &ValidMouseButton);
166 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Reset All Key Mappings To Default", Keywords =
"Reset Key Bindings To Default", Tooltip =
"Restores stock bindings."), Category =
"Easy Input Remapping")
167 static void ResetToDefault(UDataTable*
const InActionMapDataTable, UDataTable*
const InAxisMapDataTable);
169 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Rebind Action Mapping", Keywords =
"Map Action Key", Tooltip =
"Rebinds the provided action mapping to a new key. Returns false if unsuccessfull."), Category =
"Easy Input Remapping")
172 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Rebind Axis Mapping", Keywords =
"Map Axis Key", Tooltip =
"Rebinds the provided axis mapping to a new key. Returns false if unsuccessfull."), Category =
"Easy Input Remapping")
175 UFUNCTION(BlueprintPure, meta = (DisplayName =
"Get All Action Mappings", Tooltip =
"This returns action mappings, which can be filtered by the filters you input (Both inputs are optional). To only get action mappings that have a certain property, add a filter, and specify the value of that property in the 'Filter Data' input. As an example, if you add 'Key' as a filter, it will only return action mappings that use the key specified in the 'Filter Data' input. As another example: If you add the filter 'Exclude Keyboard', only non-keyboard keys will be outputted, such as Mouse & Gamepad. Adding more than 1 of the same filter will not do anything.", AutoCreateRefTerm =
"Filters"), Category =
"Easy Input Remapping")
176 static void GetAllActionMappings(
FInputActionMappingStruct FilterData, TArray<EActionMappingFilter> Filters,
bool& ReturnValue, TArray<FInputActionMappingStruct>& ActionMappings);
178 UFUNCTION(BlueprintPure, meta = (DisplayName =
"Get All Axis Mappings", Tooltip =
"This returns action mappings, which can be filtered by the filters you input (Both inputs are optional). To only get action mappings that have a certain property, add a filter, and specify the value of that property in the 'Filter Data' input. As an example, if you add 'Key' as a filter, it will only return action mappings that use the key specified in the 'Filter Data' input. As another example: If you add the filter 'Exclude Keyboard', only non-keyboard keys will be outputted, such as Mouse & Gamepad. Adding more than 1 of the same filter will not do anything.", AutoCreateRefTerm =
"Filters"), Category =
"Easy Input Remapping")
179 static void GetAllAxisMappings(
FInputAxisMappingStruct FilterData, TArray<EAxisMappingFilter> Filters,
bool& ReturnValue, TArray<FInputAxisMappingStruct>& AxisMappings);
181 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Create New Action Mapping", Tooltip =
"Creates a new action mapping using the data specified. This can easily clutter your config files if you blindly make new action mappings without ever deleting them, so be aware. Returns false if the specified action mapping already exists."), Category =
"Easy Input Remapping")
184 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Create New Axis Mapping", Tooltip =
"Creates a new axis mapping using the data specified. This can easily clutter your config files if you blindly make new axis mappings without ever deleting them, so be aware. Returns false if the specified axis mapping already exists."), Category =
"Easy Input Remapping")
187 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Remove Action Mapping", Tooltip =
"Completely removes/deletes the specified action mapping. Returns false if the specified action mapping is not found."), Category =
"Easy Input Remapping")
190 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Remove Axis Mapping", Tooltip =
"Completely removes/deletes the specified axis mapping. Returns false if the specified axis mapping is not found."), Category =
"Easy Input Remapping")
193 UFUNCTION(BlueprintPure, meta = (DisplayName =
"Equal (ActionMapping)", Tooltip =
"Returns true if A is exactly equal to B (A == B)", CompactNodeTitle =
"==", AutoCreateRefTerm =
"A,B"), Category =
"Easy Input Remapping")
196 UFUNCTION(BlueprintPure, meta = (DisplayName =
"NotEqual (ActionMapping)", Tooltip =
"Returns true if A does not equal B (A != B)", CompactNodeTitle =
"!=", AutoCreateRefTerm =
"A,B"), Category =
"Easy Input Remapping")
199 UFUNCTION(BlueprintPure, meta = (DisplayName =
"Equal (AxisMapping)", Tooltip =
"Returns true if A is exactly equal to B (A == B)", CompactNodeTitle =
"==", AutoCreateRefTerm =
"A,B"), Category =
"Easy Input Remapping")
202 UFUNCTION(BlueprintPure, meta = (DisplayName =
"NotEqual (AxisMapping)", Tooltip =
"Returns true if A does not equal B (A != B)", CompactNodeTitle =
"!=", AutoCreateRefTerm =
"A,B"), Category =
"Easy Input Remapping")