Files
jminos/src/GraphicalUI/Settings.h
2025-03-22 17:41:33 +01:00

57 lines
1.1 KiB
C++

#pragma once
#include "../Core/Menu.h"
#include "Keybinds.h"
#include "PiecesType.h"
#include <SFML/Graphics.hpp>
#include <vector>
class Settings {
private:
Menu menu;
std::vector<Keybinds> keybinds;
int chosenKeybinds;
Gamemode gamemode;
int windowSizeMode;
std::vector<std::pair<PiecesType, int>> selectedPieces;
public:
Settings();
void loadSettingsFromFile();
void saveSettingsToFile() const;
bool selectNextKeybinds();
bool selectPreviousKeybinds();
bool canModifyCurrentKeybinds() const;
void setGamemode(Gamemode gamemode);
bool widenWindow();
bool shortenWindow();
void selectPieces(PiecesType type, int value);
void unselectPieces(int index);
void confirmSelectedPieces();
Menu& getMenu();
Keybinds& getKeybinds();
Gamemode getGamemode() const;
int getWindowSizeMultiplier() const;
const sf::VideoMode getVideoMode() const;
const std::vector<std::pair<PiecesType, int>>& getSelectedPieces() const;
};