Polyphase Game Engine
Loading...
Searching...
No Matches
InputPath.h
Go to the documentation of this file.
1#pragma once
2
3#include "PlayerInputSystem.h"
4#include "InputTypes.h"
5
6#include <string>
7
8// Canonical lookup-key synthesis for InputPromptMap.
9//
10// Keyboard + POLYPHASE_KEY_F -> "Keyboard/F"
11// MouseButton + MOUSE_LEFT -> "Mouse/Left"
12// GamepadButton + GAMEPAD_A -> "Gamepad.Button/A"
13// GamepadAxis + GAMEPAD_AXIS_LTRIGGER +ve -> "Gamepad.Axis/LTrigger+"
14// Pointer + (any) -> "Pointer/0"
15//
16// The path is stable across platforms (uses InputMap's display names) so a
17// single InputPromptMap entry of "Keyboard/F" matches every host that resolves
18// POLYPHASE_KEY_F.
19std::string MakeInputPath(const InputActionBinding& binding);
20
21// Inverse helper used by the editor capture modal — builds a binding from the
22// last-pressed key/button/axis. The caller already knows the (sourceType, code,
23// axisDirection); this just wraps the construction for readability.
26 int32_t gamepadIndex = 0);
std::string MakeInputPath(const InputActionBinding &binding)
Definition InputPath.cpp:17
InputActionBinding MakeBinding(InputSourceType type, int32_t code, AxisDirection axisDir=AxisDirection::Positive, int32_t gamepadIndex=0)
Definition InputPath.cpp:51
AxisDirection
Definition PlayerInputSystem.h:36
InputSourceType
Definition PlayerInputSystem.h:11
Definition PlayerInputSystem.h:51