This commit is contained in:
2025-03-22 23:30:52 +01:00
parent 6b16abda6a
commit 9780a36af4
18 changed files with 114 additions and 29 deletions

View File

@@ -3,7 +3,7 @@
#include "../Core/Action.h"
#include <map>
#include <vector>
#include <set>
#include <SFML/Graphics.hpp>
using sfKey = sf::Keyboard::Key;
@@ -14,7 +14,7 @@ static const int CUSTOMIZABLE_KEYBINDS = NUMBER_OF_KEYBINDS - 1;
class Keybinds {
private:
std::map<Action, std::vector<sfKey>> keybinds;
std::map<Action, std::set<sfKey>> keybinds;
int layoutNumber;
public:
@@ -28,7 +28,7 @@ class Keybinds {
void clearKeys(Action action);
const std::vector<Action>& getActions(sfKey key) const;
const std::set<Action> getActions(sfKey key) const;
const std::vector<sfKey>& getKeybinds(Action action) const;
const std::set<sfKey>& getKeybinds(Action action) const;
};