diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-09 14:43:54 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-09 14:43:54 +0100 |
| commit | 518edf6f3050022fa4d1a15d147efe6665459863 (patch) | |
| tree | 99bb53b970af942a0bef3f1801c9c2afaf1f73d1 /src/preferences/EditorPrefs.hpp | |
| parent | 445cc09d01f8e3beeb406e175b5a98d6be58ea9a (diff) | |
Bind settings of the Editor (still ongoing)
Diffstat (limited to 'src/preferences/EditorPrefs.hpp')
| -rw-r--r-- | src/preferences/EditorPrefs.hpp | 14 |
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); } }; |
