libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
MouseButtonToAxisDirectionMapping.h
Go to the documentation of this file.
1#pragma once
2
6#include <memory>
7
8namespace Ship {
9class ConsoleVariable;
10class ControlDeck;
11
19 public:
27 MouseButtonToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction, MouseBtn button,
28 std::shared_ptr<ControlDeck> controlDeck = nullptr,
29 std::shared_ptr<ConsoleVariable> consoleVariable = nullptr);
30
33
35 std::string GetAxisDirectionMappingId() override;
36
38 int8_t GetMappingType() override;
39
41 void SaveToConfig() override;
42
44 void EraseFromConfig() override;
45
47 std::string GetPhysicalDeviceName() override;
48
50 std::string GetPhysicalInputName() override;
51
52 protected:
53 std::shared_ptr<ConsoleVariable> mConsoleVariable;
54 std::shared_ptr<ControlDeck> mControlDeck;
55};
56} // namespace Ship
Maps a physical input to a virtual analog stick direction.
Definition ControllerAxisDirectionMapping.h:27
Base class for mappings that bind a mouse button to any controller input.
Definition MouseButtonToAnyMapping.h:15
Maps a mouse button to a virtual analog stick direction.
Definition MouseButtonToAxisDirectionMapping.h:18
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound mouse button.
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the mouse device.
std::string GetAxisDirectionMappingId() override
Returns the unique string identifier for this mapping.
MouseButtonToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction, MouseBtn button, std::shared_ptr< ControlDeck > controlDeck=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr)
Constructs a mouse-button-to-axis-direction mapping.
void SaveToConfig() override
Persists this mapping to the application configuration.
std::shared_ptr< ControlDeck > mControlDeck
Definition MouseButtonToAxisDirectionMapping.h:54
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition MouseButtonToAxisDirectionMapping.h:53
void EraseFromConfig() override
Removes this mapping from the application configuration.
float GetNormalizedAxisDirectionValue() override
Returns the normalised axis value (0 or MAX_AXIS_RANGE).
int8_t GetMappingType() override
Returns the mapping type identifier.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
Direction
Identifies the direction component of an axis mapping.
Definition ControllerAxisDirectionMapping.h:18
MouseBtn
Identifies a mouse button delivered to the input mapping system.
Definition KeyboardScancodes.h:136
StickIndex
Identifies which analog stick an axis mapping applies to.
Definition ControllerAxisDirectionMapping.h:15