on commence l'interface là ouais

This commit is contained in:
2025-03-21 22:52:29 +01:00
parent 021620acef
commit c25abec6ba
20 changed files with 521 additions and 7 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include "../Core/Action.h"
#include <map>
#include <vector>
#include <SFML/Graphics.hpp>
using sfKey = sf::Keyboard::Key;
class Keybinds {
private:
std::map<Action, std::vector<sfKey>> keybinds;
public:
Keybinds();
void loadKeybindsFromFile();
void saveKeybindsToFile() const;
void createDefaultKeybindsFile() const;
void addKey(Action action, sfKey key);
void clearKeys(Action action);
const std::vector<Action>& getActions(sfKey key) const;
const std::vector<sfKey>& getKeybinds(Action action) const;
};