InputBindingsConfig
- Module
- Input
- Header
#include "Input/InputBindingsConfig.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
std::unordered_map<std::string, Scope<InputContext>> | LoadFromFile | The project tier is Config/Input.ini: a [Context <Name>] section per context (consumes_input=, priority=), an action per line — +Action=(Name="Jump",type="Button",Binding=((Name="Key",key="Space"))) — the MDF document's nodes spelled as UE structs. |
bool | SaveToFile | |
bool | ConvertLegacy | A legacy Input.mdf in the INI form above, for ResolveConfigFile. |
std::vector<FInputBindingOverride> | LoadOverridesFromFile | The player tier of the same format: root Context nodes holding only the actions the player retargeted. |
bool | SaveOverridesToFile | Rewrites only the Context roots, leaving every other root alone — the user file is shared with InputManager's gamepad slot preferences, and clobbering those would reshuffle the player's pads on the next boot. |
std::optional<KeyCode> | StringToKeyCode | |
std::string | KeyCodeToString | |
std::optional<MouseButton> | StringToMouseButton | |
std::string | MouseButtonToString | |
std::optional<GamepadButton> | StringToGamepadButton | |
std::string | GamepadButtonToString | |
std::optional<GamepadAxis> | StringToGamepadAxis | |
std::string | GamepadAxisToString | |
std::optional<InputSourceType> | StringToSourceType | |
std::string | SourceTypeToString | |
std::optional<InputActionType> | StringToActionType | |
std::string | ActionTypeToString | |
std::optional<EInputModifierType> | StringToModifierType | |
std::string | ModifierTypeToString | |
std::optional<EInputTriggerType> | StringToTriggerType | |
std::string | TriggerTypeToString | |
float | StringToSwizzleOrder | Swizzle order code (InputModifier::param0) <-> "YXZ" ... |
std::string | SwizzleOrderToString | |
std::optional<EInputAccumulation> | StringToAccumulation | |
std::string | AccumulationToString |
Function details
LoadFromFile
static std::unordered_map<std::string, Scope<InputContext>> LoadFromFile(const std::string& filepath)The project tier is Config/Input.ini: a [Context <Name>] section per context (consumes_input=, priority=), an action per line — +Action=(Name="Jump",type="Button",Binding=((Name="Key",key="Space"))) — the MDF document's nodes spelled as UE structs. LoadFromFile reads that, a legacy Input.mdf, or binary MDF; SaveToFile writes the encoding the extension names.
SaveToFile
static bool SaveToFile(const std::string& filepath, const std::unordered_map<std::string, Scope<InputContext>>& contexts)ConvertLegacy
static bool ConvertLegacy(const MDF::MdfDocument& legacy, FConfigIniFile& out)A legacy Input.mdf in the INI form above, for ResolveConfigFile.
LoadOverridesFromFile
static std::vector<FInputBindingOverride> LoadOverridesFromFile(const std::string& filepath)The player tier of the same format: root Context nodes holding only the actions the player retargeted.
SaveOverridesToFile
static bool SaveOverridesToFile(const std::string& filepath, const std::vector<FInputBindingOverride>& overrides)Rewrites only the Context roots, leaving every other root alone — the user file is shared with InputManager's gamepad slot preferences, and clobbering those would reshuffle the player's pads on the next boot.
StringToKeyCode
static std::optional<KeyCode> StringToKeyCode(const std::string& str)KeyCodeToString
static std::string KeyCodeToString(KeyCode key)StringToMouseButton
static std::optional<MouseButton> StringToMouseButton(const std::string& str)MouseButtonToString
static std::string MouseButtonToString(MouseButton button)StringToGamepadButton
static std::optional<GamepadButton> StringToGamepadButton(const std::string& str)GamepadButtonToString
static std::string GamepadButtonToString(GamepadButton button)StringToGamepadAxis
static std::optional<GamepadAxis> StringToGamepadAxis(const std::string& str)GamepadAxisToString
static std::string GamepadAxisToString(GamepadAxis axis)StringToSourceType
static std::optional<InputSourceType> StringToSourceType(const std::string& str)SourceTypeToString
static std::string SourceTypeToString(InputSourceType type)StringToActionType
static std::optional<InputActionType> StringToActionType(const std::string& str)ActionTypeToString
static std::string ActionTypeToString(InputActionType type)StringToModifierType
static std::optional<EInputModifierType> StringToModifierType(const std::string& str)ModifierTypeToString
static std::string ModifierTypeToString(EInputModifierType type)StringToTriggerType
static std::optional<EInputTriggerType> StringToTriggerType(const std::string& str)TriggerTypeToString
static std::string TriggerTypeToString(EInputTriggerType type)StringToSwizzleOrder
static float StringToSwizzleOrder(const std::string& str)Swizzle order code (InputModifier::param0) <-> "YXZ" ... "ZXY".
SwizzleOrderToString
static std::string SwizzleOrderToString(float order)StringToAccumulation
static std::optional<EInputAccumulation> StringToAccumulation(const std::string& str)AccumulationToString
static std::string AccumulationToString(EInputAccumulation accumulation)