mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-15 05:57:40 +00:00
Add code for feature "Disable Touch"
This commit is contained in:
@@ -281,20 +281,21 @@ void SetPlayDeadView::focus() {
|
||||
SetUIView::SetUIView(NavigationView& nav) {
|
||||
add_children({
|
||||
//&checkbox_login,
|
||||
&checkbox_enable_touchscreen,
|
||||
&checkbox_speaker,
|
||||
&checkbox_bloff,
|
||||
&options_bloff,
|
||||
&checkbox_showsplash,
|
||||
&checkbox_showclock,
|
||||
&options_clockformat,
|
||||
&options_clockformat,
|
||||
&button_ok
|
||||
});
|
||||
|
||||
checkbox_enable_touchscreen.set_value(persistent_memory::enable_touchscreen());
|
||||
checkbox_speaker.set_value(persistent_memory::config_speaker());
|
||||
checkbox_showsplash.set_value(persistent_memory::config_splash());
|
||||
checkbox_showclock.set_value(!persistent_memory::hide_clock());
|
||||
//checkbox_login.set_value(persistent_memory::config_login());
|
||||
//Add code for touch disabled
|
||||
|
||||
uint32_t backlight_timer = persistent_memory::config_backlight_timer();
|
||||
if (backlight_timer) {
|
||||
@@ -333,6 +334,7 @@ SetUIView::SetUIView(NavigationView& nav) {
|
||||
}
|
||||
persistent_memory::set_config_splash(checkbox_showsplash.value());
|
||||
persistent_memory::set_clock_hidden(!checkbox_showclock.value());
|
||||
persistent_memory::set_enable_touchscreen(checkbox_enable_touchscreen.value());
|
||||
//persistent_memory::set_config_login(checkbox_login.value());
|
||||
nav.pop();
|
||||
};
|
||||
|
@@ -224,6 +224,12 @@ private:
|
||||
20,
|
||||
"Login with play dead"
|
||||
};*/
|
||||
|
||||
Checkbox checkbox_enable_touchscreen {
|
||||
{ 3 * 8, 2 * 16 },
|
||||
20,
|
||||
"Enable touchscreen"
|
||||
};
|
||||
|
||||
Checkbox checkbox_speaker {
|
||||
{ 3 * 8, 4 * 16 },
|
||||
|
Reference in New Issue
Block a user