5#include <unordered_map>
26 mControlDeck = std::move(controlDeck);
32 ControllerLED(uint8_t portIndex, std::shared_ptr<ConsoleVariable> consoleVariable =
nullptr,
33 std::shared_ptr<ControlDeck> controlDeck =
nullptr);
100 std::unordered_map<std::string, std::shared_ptr<ControllerLEDMapping>> mLEDMappings;
101 std::shared_ptr<ConsoleVariable> mConsoleVariable;
102 std::shared_ptr<ControlDeck> mControlDeck;
Aggregates LED output mappings and drives controller lighting hardware.
Definition ControllerLED.h:22
void LoadLEDMappingFromConfig(std::string id)
Loads the mapping with id from Config and adds it to the collection.
void ClearLEDMapping(std::string id)
Removes the mapping with id from both in-memory and Config.
ControllerLED(uint8_t portIndex, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr, std::shared_ptr< ControlDeck > controlDeck=nullptr)
Constructs a ControllerLED for the given port.
void ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType)
Removes all mappings that target the given device type.
void ClearAllMappings()
Removes all in-memory LED mappings.
void SetLEDColor(Color_RGB8 color)
Sends color to all mapped physical devices.
void SetControlDeck(std::shared_ptr< ControlDeck > controlDeck)
Injects the owning ControlDeck.
Definition ControllerLED.h:25
void ClearLEDMappingId(std::string id)
Removes the mapping ID from Config without destroying the in-memory object.
bool AddLEDMappingFromRawPress()
Listens for the next raw physical input and creates an LED mapping from it.
bool HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType)
Returns true if any mapping targets the given device type.
std::unordered_map< std::string, std::shared_ptr< ControllerLEDMapping > > GetAllLEDMappings()
Returns a copy of the full id → mapping map.
void SaveLEDMappingIdsToConfig()
Writes the current set of mapping IDs to Config.
void AddLEDMapping(std::shared_ptr< ControllerLEDMapping > mapping)
Adds an LED mapping to the collection.
void ReloadAllMappingsFromConfig()
Clears all in-memory mappings and reloads them from Config.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
PhysicalDeviceType
Identifies the category of a physical input device.
Definition PhysicalDeviceType.h:11
8-bit RGB colour without an alpha channel.
Definition color.h:14