77 bool save(
const std::filesystem::path& path)
const;
87 std::array<Key, GAME_ACTION_COUNT>
_keys{};
GameKeyBindings()
Construit avec les valeurs par défaut (flèches/Espace/Maj/E, cf. PlayerInputMapper....
Definition GameKeyBindings.cpp:61
Key key(GameAction action) const noexcept
Definition GameKeyBindings.cpp:65
std::array< Key, GAME_ACTION_COUNT > _keys
Definition GameKeyBindings.h:87
void resetToDefaults() noexcept
Restaure les sept actions à leurs touches par défaut (defaultKey).
Definition GameKeyBindings.cpp:82
static GameKeyBindings load(const std::filesystem::path &path)
Charge la section "jeu" de path.
Definition GameKeyBindings.cpp:122
static Key defaultKey(GameAction action) noexcept
Definition GameKeyBindings.cpp:41
void setKey(GameAction action, Key newKey) noexcept
Lie action à newKey.
Definition GameKeyBindings.cpp:71
bool save(const std::filesystem::path &path) const
Sauvegarde dans la section "jeu" de path, en préservant une section "editeur" déjà présente (écrite p...
Definition GameKeyBindings.cpp:91
Definition AudioEngine.cpp:15
@ Jump
Definition ProceduralAtlas.h:27
GameAction
Action de jeu logique, remappable indépendamment de la touche physique qui la déclenche.
Definition GameKeyBindings.h:28
@ Dash
Definition GameKeyBindings.h:34
@ MoveRight
Definition GameKeyBindings.h:30
@ AimUp
Definition GameKeyBindings.h:31
@ AimDown
Definition GameKeyBindings.h:32
@ MoveLeft
Definition GameKeyBindings.h:29
@ Interact
Definition GameKeyBindings.h:35
Key
Touche du clavier, identifiée par son code virtuel Win32.
Definition InputState.h:29
constexpr int GAME_ACTION_COUNT
Nombre d'actions de jeu remappables (GameAction).
Definition GameKeyBindings.h:39