push changement de location
This commit is contained in:
55
SQCSim-common/parameters.h
Normal file
55
SQCSim-common/parameters.h
Normal file
@@ -0,0 +1,55 @@
|
||||
#ifndef PARAMETERS_H
|
||||
#define PARAMETERS_H
|
||||
|
||||
#include <optional>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <variant>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
using ParameterValue = std::variant<float, int, bool, std::string>;
|
||||
|
||||
class Parameters {
|
||||
public:
|
||||
Parameters();
|
||||
~Parameters();
|
||||
|
||||
void SaveAudioParameters();
|
||||
void SaveGraphicParameters();
|
||||
void SaveGameParameters();
|
||||
|
||||
void LoadAudioParameters();
|
||||
void LoadGraphicParameters();
|
||||
void LoadGameParameters();
|
||||
|
||||
void SetAudioParameter(const std::string& key, const ParameterValue& value);
|
||||
void SetGraphicParameter(const std::string& key, const ParameterValue& value);
|
||||
void SetGameParameter(const std::string& key, const ParameterValue& value);
|
||||
|
||||
std::optional<ParameterValue> GetAudioParameter(const std::string& key) const;
|
||||
std::optional<ParameterValue> GetGraphicParameter(const std::string& key) const;
|
||||
std::optional<ParameterValue> GetGameParameter(const std::string& key) const;
|
||||
|
||||
private:
|
||||
std::map<std::string, ParameterValue> m_audioSettings;
|
||||
std::map<std::string, ParameterValue> m_graphicSettings;
|
||||
std::map<std::string, ParameterValue> m_gameplaySettings;
|
||||
|
||||
// Audio
|
||||
float m_mainVolume;
|
||||
float m_musicVolume;
|
||||
float m_sfxVolume;
|
||||
|
||||
// Graphic
|
||||
float m_resolutionX;
|
||||
float m_resolutionY;
|
||||
bool m_fullscreen;
|
||||
|
||||
// Gameplay
|
||||
float m_mouseSensitivity;
|
||||
|
||||
};
|
||||
|
||||
#endif // PARAMETERS_H
|
Reference in New Issue
Block a user