Some checks failed
Linux arm64 / Build (push) Failing after 3m33s
Fix #11 Co-authored-by: Morph01 <145839520+Morph01@users.noreply.github.com> Reviewed-on: #27
63 lines
851 B
C++
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
|