libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
MouseWheelToButtonMapping.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:
26 MouseWheelToButtonMapping(uint8_t portIndex, CONTROLLERBUTTONS_T bitmask, WheelDirection wheelDirection,
27 std::shared_ptr<ControlDeck> controlDeck = nullptr,
28 std::shared_ptr<ConsoleVariable> consoleVariable = nullptr);
29
34 void UpdatePad(CONTROLLERBUTTONS_T& padButtons) override;
35
37 int8_t GetMappingType() override;
38
40 std::string GetButtonMappingId() override;
41
43 void SaveToConfig() override;
44
46 void EraseFromConfig() override;
47
49 std::string GetPhysicalDeviceName() override;
50
52 std::string GetPhysicalInputName() override;
53
54 protected:
55 std::shared_ptr<ConsoleVariable> mConsoleVariable;
56 std::shared_ptr<ControlDeck> mControlDeck;
57};
58} // namespace Ship
#define CONTROLLERBUTTONS_T
Definition ControllerButtonMapping.h:13
Maps a physical input to a virtual controller button.
Definition ControllerButtonMapping.h:23
Base class for mappings that bind a mouse scroll-wheel direction to any controller input.
Definition MouseWheelToAnyMapping.h:15
Maps a mouse scroll-wheel direction to a virtual controller button.
Definition MouseWheelToButtonMapping.h:18
void SaveToConfig() override
Persists this mapping to the application configuration.
void EraseFromConfig() override
Removes this mapping from the application configuration.
std::shared_ptr< ControlDeck > mControlDeck
Definition MouseWheelToButtonMapping.h:56
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the mouse device.
int8_t GetMappingType() override
Returns the mapping type identifier.
std::string GetButtonMappingId() override
Returns the unique string identifier for this mapping.
void UpdatePad(CONTROLLERBUTTONS_T &padButtons) override
Updates the pad button state based on the current wheel state.
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition MouseWheelToButtonMapping.h:55
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound wheel direction.
MouseWheelToButtonMapping(uint8_t portIndex, CONTROLLERBUTTONS_T bitmask, WheelDirection wheelDirection, std::shared_ptr< ControlDeck > controlDeck=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr)
Constructs a mouse-wheel-to-button mapping.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
WheelDirection
Identifies a scroll-wheel direction delivered to the input mapping system.
Definition KeyboardScancodes.h:149