implement instant text setting

This commit is contained in:
gymnast86
2026-04-17 01:30:08 -07:00
parent 363788accd
commit 5ba04524eb
7 changed files with 64 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
//
// Created by carlw on 4/17/2026.
//
#ifndef DUSK_SCOPE_GUARD_HPP
#define DUSK_SCOPE_GUARD_HPP
#include <functional>
class SimpleScopeGuard {
public:
// Store the function in the constructor
explicit SimpleScopeGuard(const std::function<void()>& func) : m_func(func) {}
// Run the function when the object goes out of scope
~SimpleScopeGuard() {
if (m_func) m_func();
}
private:
std::function<void()> m_func;
};
#endif //DUSK_SCOPE_GUARD_HPP
+1
View File
@@ -61,6 +61,7 @@ struct UserSettings {
ConfigVar<bool> noMissClimbing;
ConfigVar<bool> fastTears;
ConfigVar<bool> instantSaves;
ConfigVar<bool> instantText;
ConfigVar<bool> sunsSong;
// Preferences