7#include <aegis2d/platform/export.hpp>
12#include <initializer_list>
48 ActionId add(std::string name, std::span<const Key> defaults);
55 ActionId add(std::string name, std::initializer_list<Key> defaults);
66 std::span<const GamepadButton> buttons);
75 ActionId add(std::string name, std::initializer_list<Key> keys,
76 std::initializer_list<GamepadButton> buttons);
80 [[nodiscard]] std::size_t
size() const noexcept;
193 void save(core::Config& settings,
std::string_view section) const;
203 std::
size_t load(const core::Config& settings,
std::string_view section);
211 void save_buttons(core::Config& settings,
std::string_view section) const;
217 std::
size_t load_buttons(const core::Config& settings,
std::string_view section);
272 std::vector<Key> default_keys;
273 std::vector<Key> keys;
274 std::vector<GamepadButton> default_buttons;
275 std::vector<GamepadButton> buttons;
278 [[nodiscard]]
const Entry& entry(
ActionId action)
const;
279 [[nodiscard]] Entry& entry(
ActionId action);
281 std::vector<Entry> entries_;
JSON configuration with dotted-path lookups, which can be changed and saved.
Gamepad buttons, sticks and triggers, with no SDL type.
Keyboard keys, their names, and the state of the keyboard during a frame.
Definition endpoint.hpp:85