Some checks failed
Linux arm64 / Build (push) Has been cancelled
ajout d'un changement pour la cadence de tir Co-authored-by: Morph01 <145839520+Morph01@users.noreply.github.com> Co-authored-by: Persson-dev <sim16.prib@gmail.com> Reviewed-on: #33 Reviewed-by: Simon Pribylski <sim16.prib@gmail.com> Co-authored-by: Morph01 <thibaut6969delastreet@gmail.com> Co-committed-by: Morph01 <thibaut6969delastreet@gmail.com>
76 lines
1.1 KiB
C++
76 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "blitz/game/Game.h"
|
|
#include <array>
|
|
#include <string>
|
|
|
|
namespace blitz {
|
|
|
|
enum KeyAction {
|
|
kaAvancer = 0,
|
|
kaReculer,
|
|
kaDroite,
|
|
kaGauche,
|
|
kaFenetreAdmin,
|
|
kaMax,
|
|
};
|
|
|
|
typedef std::array<int, kaMax> Keybinds;
|
|
|
|
class BlitzConfig {
|
|
private:
|
|
std::array<char, 256> m_Pseudo;
|
|
game::GameConfig m_ServerConfig;
|
|
bool m_VSync;
|
|
bool m_DisplayFps;
|
|
Keybinds m_Keybinds{};
|
|
float m_MouseSpeed;
|
|
|
|
public:
|
|
BlitzConfig();
|
|
~BlitzConfig();
|
|
|
|
std::array<char, 256>& GetPseudo() {
|
|
return m_Pseudo;
|
|
}
|
|
|
|
bool IsVSyncEnabled() const {
|
|
return m_VSync;
|
|
}
|
|
|
|
void SetVSync(bool vsync) {
|
|
m_VSync = vsync;
|
|
}
|
|
|
|
bool IsFPSDisplayEnabled() const {
|
|
return m_DisplayFps;
|
|
}
|
|
|
|
void SetFPSDisplay(bool display) {
|
|
m_DisplayFps = display;
|
|
}
|
|
|
|
Keybinds& GetKeys() {
|
|
return m_Keybinds;
|
|
}
|
|
|
|
float GetMouseSpeed() const {
|
|
return m_MouseSpeed;
|
|
}
|
|
|
|
void SetMouseSpeed(float MouseSpeed) {
|
|
m_MouseSpeed = MouseSpeed;
|
|
}
|
|
|
|
game::GameConfig& GetServerConfig() {
|
|
return m_ServerConfig;
|
|
}
|
|
|
|
private:
|
|
void LoadConfig();
|
|
void LoadDefaultConfig();
|
|
void SaveConfig();
|
|
};
|
|
|
|
} // namespace blitz
|