mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 08:20:32 +00:00
Fix deprecation warnings in IsBindable (#45)
Merging PR #45: Fix deprecation warnings in IsBindable. Replaced FKey::IsFloatAxis and FKey::IsVectorAxis calls with the corresponding FKey::IsAxis[1|2|3]D method calls. Background: FKey::IsFloatAxis and FKey::IsVectorAxis are marked as deprecated as of UE4.26, replaced with FKey::IsAxis[1|2|3]D methods.
This commit is contained in:
parent
ea74c3c872
commit
47473c3eeb
@ -40,8 +40,13 @@ namespace
|
|||||||
|
|
||||||
bool IsBindable(const FKey& Key)
|
bool IsBindable(const FKey& Key)
|
||||||
{
|
{
|
||||||
|
#if ENGINE_COMPATIBILITY_LEGACY_KEY_AXIS_API
|
||||||
return Key.IsValid() && Key != EKeys::AnyKey && !Key.IsFloatAxis() && !Key.IsVectorAxis()
|
return Key.IsValid() && Key != EKeys::AnyKey && !Key.IsFloatAxis() && !Key.IsVectorAxis()
|
||||||
&& !Key.IsGamepadKey() && !Key.IsModifierKey() && !Key.IsMouseButton();
|
&& !Key.IsGamepadKey() && !Key.IsModifierKey() && !Key.IsMouseButton();
|
||||||
|
#else
|
||||||
|
return Key.IsValid() && Key != EKeys::AnyKey && !Key.IsAxis1D() && !Key.IsAxis2D()
|
||||||
|
&& !Key.IsAxis3D() && !Key.IsGamepadKey() && !Key.IsModifierKey() && !Key.IsMouseButton();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdatePlayerInput(UPlayerInput* PlayerInput, const FKeyBind& KeyBind)
|
void UpdatePlayerInput(UPlayerInput* PlayerInput, const FKeyBind& KeyBind)
|
||||||
|
@ -31,3 +31,5 @@
|
|||||||
// Starting from version 4.24, world actor tick event has additional world parameter.
|
// Starting from version 4.24, world actor tick event has additional world parameter.
|
||||||
#define ENGINE_COMPATIBILITY_LEGACY_WORLD_ACTOR_TICK BELOW_ENGINE_VERSION(4, 24)
|
#define ENGINE_COMPATIBILITY_LEGACY_WORLD_ACTOR_TICK BELOW_ENGINE_VERSION(4, 24)
|
||||||
|
|
||||||
|
// Starting from version 4.26, FKey::IsFloatAxis and FKey::IsVectorAxis are deprecated and replaced with FKey::IsAxis[1|2|3]D methods.
|
||||||
|
#define ENGINE_COMPATIBILITY_LEGACY_KEY_AXIS_API BELOW_ENGINE_VERSION(4, 26)
|
||||||
|
Loading…
Reference in New Issue
Block a user