libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
KeyboardKeyToAxisDirectionMapping.h
Go to the documentation of this file.
3#include <memory>
4
5namespace Ship {
6class ConsoleVariable;
7class ControlDeck;
8
16 public:
24 KeyboardKeyToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction,
25 KbScancode scancode, std::shared_ptr<ControlDeck> controlDeck = nullptr,
26 std::shared_ptr<Window> window = nullptr,
27 std::shared_ptr<ConsoleVariable> consoleVariable = nullptr);
28
31
33 std::string GetAxisDirectionMappingId() override;
34
36 int8_t GetMappingType() override;
37
39 void SaveToConfig() override;
40
42 void EraseFromConfig() override;
43
45 std::string GetPhysicalDeviceName() override;
46
48 std::string GetPhysicalInputName() override;
49
50 protected:
51 std::shared_ptr<ConsoleVariable> mConsoleVariable;
52 std::shared_ptr<ControlDeck> mControlDeck;
53};
54} // namespace Ship
Maps a physical input to a virtual analog stick direction.
Definition ControllerAxisDirectionMapping.h:27
Base class for mappings that bind a keyboard key to any controller input.
Definition KeyboardKeyToAnyMapping.h:17
Maps a keyboard key to a virtual analog stick direction.
Definition KeyboardKeyToAxisDirectionMapping.h:15
float GetNormalizedAxisDirectionValue() override
Returns the normalised axis value (0 or MAX_AXIS_RANGE).
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition KeyboardKeyToAxisDirectionMapping.h:51
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound key.
std::shared_ptr< ControlDeck > mControlDeck
Definition KeyboardKeyToAxisDirectionMapping.h:52
void SaveToConfig() override
Persists this mapping to the application configuration.
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the keyboard device.
KeyboardKeyToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction, KbScancode scancode, std::shared_ptr< ControlDeck > controlDeck=nullptr, std::shared_ptr< Window > window=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr)
Constructs a keyboard-key-to-axis-direction mapping.
int8_t GetMappingType() override
Returns the mapping type identifier.
void EraseFromConfig() override
Removes this mapping from the application configuration.
std::string GetAxisDirectionMappingId() override
Returns the unique string identifier for this mapping.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
KbScancode
Platform-independent keyboard scan codes used by the input mapping system.
Definition KeyboardScancodes.h:26
Direction
Identifies the direction component of an axis mapping.
Definition ControllerAxisDirectionMapping.h:18
StickIndex
Identifies which analog stick an axis mapping applies to.
Definition ControllerAxisDirectionMapping.h:15