aboutsummaryrefslogtreecommitdiff
path: root/src/preferences/EditorPrefs.hpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-09 14:43:54 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-09 14:43:54 +0100
commit518edf6f3050022fa4d1a15d147efe6665459863 (patch)
tree99bb53b970af942a0bef3f1801c9c2afaf1f73d1 /src/preferences/EditorPrefs.hpp
parent445cc09d01f8e3beeb406e175b5a98d6be58ea9a (diff)
Bind settings of the Editor (still ongoing)
Diffstat (limited to 'src/preferences/EditorPrefs.hpp')
-rw-r--r--src/preferences/EditorPrefs.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/preferences/EditorPrefs.hpp b/src/preferences/EditorPrefs.hpp
index 9a8ca0d..4287410 100644
--- a/src/preferences/EditorPrefs.hpp
+++ b/src/preferences/EditorPrefs.hpp
@@ -17,15 +17,25 @@ public:
}
virtual bool TransferDataToWindow() {
+ CONFIG_OPEN(config);
+ row_size->SetValue(config->Read("editor/row_size", 50));
+ col_size->SetValue(config->Read("editor/col_size", 100));
+ show_move_icons->SetValue(config->Read("editor/show_move_icons", true));
+ CONFIG_CLOSE(config);
return true;
}
void ApplyPreferences() {
-
+ CONFIG_OPEN(config);
+ config->Write("editor/row_size", row_size->GetValue());
+ config->Write("editor/col_size", col_size->GetValue());
+ config->Write("editor/show_move_icons", show_move_icons->GetValue());
+ CONFIG_CLOSE(config);
}
virtual bool TransferDataFromWindow() {
-
+ ApplyPreferences();
+ MAINWIN->ApplyPreferences();
return (true);
}
};