Files
Blitz/include/client/config/BlitzConfig.h
Morph01 6e47fa6996
Some checks failed
Linux arm64 / Build (push) Failing after 3m33s
Add admin window and server duration settings (#27)
Fix #11

Co-authored-by: Morph01 <145839520+Morph01@users.noreply.github.com>
Reviewed-on: #27
2024-03-28 21:17:24 +01:00

63 lines
851 B
C++

#pragma once
#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;
bool m_VSync;
bool m_DisplayFps;
KeyAction m_CurrentAction;
Keybinds m_Keybinds{};
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;
}
private:
void LoadConfig();
void LoadDefaultConfig();
void SaveConfig();
};
} // namespace blitz