Added option for turn on/off smooth scroll
This commit is contained in:
@ -66,6 +66,10 @@ bool Settings::load() {
|
||||
} else if (key == "Sound") {
|
||||
m_soundEnabled = (value == "1" || value == "true" || value == "True");
|
||||
}
|
||||
} else if (currentSection == "Gameplay") {
|
||||
if (key == "SmoothScroll") {
|
||||
m_smoothScrollEnabled = (value == "1" || value == "true" || value == "True");
|
||||
}
|
||||
} else if (currentSection == "Player") {
|
||||
if (key == "Name") {
|
||||
m_playerName = value;
|
||||
@ -100,6 +104,9 @@ bool Settings::save() {
|
||||
file << "Music=" << (m_musicEnabled ? "1" : "0") << "\n";
|
||||
file << "Sound=" << (m_soundEnabled ? "1" : "0") << "\n\n";
|
||||
|
||||
file << "[Gameplay]\n";
|
||||
file << "SmoothScroll=" << (m_smoothScrollEnabled ? "1" : "0") << "\n\n";
|
||||
|
||||
file << "[Player]\n";
|
||||
file << "Name=" << m_playerName << "\n\n";
|
||||
|
||||
|
||||
@ -28,6 +28,9 @@ public:
|
||||
|
||||
bool isDebugEnabled() const { return m_debugEnabled; }
|
||||
void setDebugEnabled(bool value) { m_debugEnabled = value; }
|
||||
|
||||
bool isSmoothScrollEnabled() const { return m_smoothScrollEnabled; }
|
||||
void setSmoothScrollEnabled(bool value) { m_smoothScrollEnabled = value; }
|
||||
|
||||
const std::string& getPlayerName() const { return m_playerName; }
|
||||
void setPlayerName(const std::string& name) { m_playerName = name; }
|
||||
@ -45,5 +48,6 @@ private:
|
||||
bool m_musicEnabled = true;
|
||||
bool m_soundEnabled = true;
|
||||
bool m_debugEnabled = false;
|
||||
bool m_smoothScrollEnabled = true;
|
||||
std::string m_playerName = "Player";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user