aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/main.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/main.hpp')
-rw-r--r--apps/settings/main.hpp36
1 files changed, 27 insertions, 9 deletions
diff --git a/apps/settings/main.hpp b/apps/settings/main.hpp
index 927caca..589be70 100644
--- a/apps/settings/main.hpp
+++ b/apps/settings/main.hpp
@@ -1,10 +1,28 @@
#pragma once
-#include "../../api.hpp"
-
-namespace app_settings {
- int init(Api *app_api);
- int render(Api *app_api);
- int btnpressed(Api *app_api, uint gpio, unsigned long delta);
- int bgrefresh(Api *app_api, bool in_foreground);
- int destroy(Api *app_api);
-}
+#include "../../base_app.hpp"
+#include "strings.hpp"
+
+class app_settings : public BaseApp {
+ private:
+ const char *MAIN_SET_NAMES[MAIN_SET_NUM] = {SET0_NAME, SET1_NAME};
+ int selected_setting = 0;
+ char display_setting_name[SIZE_SETTING_NAME];
+ bool selected = false;
+
+ void show_title(Api *app_api);
+ void set0_menu(Api *app_api);
+ void set1_menu(Api *app_api);
+
+ AppAttributes app_attributes = {2, true};
+ public:
+ const AppAttributes& app_get_attributes() {
+ return app_attributes;
+ }
+
+ app_settings(Api *app_api);
+ int render(Api *app_api);
+ int btnpressed(Api *app_api, uint gpio, unsigned long delta);
+ int bgrefresh(Api *app_api, bool in_foreground);
+ ~app_settings();
+};
+#include "strings-undef.hpp"