mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
commit
bec70b4ee5
@ -41,7 +41,6 @@ using namespace portapack;
|
|||||||
#include "freqman.hpp"
|
#include "freqman.hpp"
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
SetDateTimeView::SetDateTimeView(
|
SetDateTimeView::SetDateTimeView(
|
||||||
NavigationView& nav
|
NavigationView& nav
|
||||||
) {
|
) {
|
||||||
@ -306,7 +305,6 @@ namespace ui {
|
|||||||
checkbox_load_app_settings.set_value(persistent_memory::load_app_settings());
|
checkbox_load_app_settings.set_value(persistent_memory::load_app_settings());
|
||||||
checkbox_save_app_settings.set_value(persistent_memory::save_app_settings());
|
checkbox_save_app_settings.set_value(persistent_memory::save_app_settings());
|
||||||
|
|
||||||
|
|
||||||
button_save.on_select = [&nav, this](Button&) {
|
button_save.on_select = [&nav, this](Button&) {
|
||||||
persistent_memory::set_load_app_settings(checkbox_load_app_settings.value());
|
persistent_memory::set_load_app_settings(checkbox_load_app_settings.value());
|
||||||
persistent_memory::set_save_app_settings(checkbox_save_app_settings.value());
|
persistent_memory::set_save_app_settings(checkbox_save_app_settings.value());
|
||||||
@ -405,6 +403,7 @@ namespace ui {
|
|||||||
&check_load_mem_at_startup,
|
&check_load_mem_at_startup,
|
||||||
&button_save_mem_to_file,
|
&button_save_mem_to_file,
|
||||||
&button_load_mem_from_file,
|
&button_load_mem_from_file,
|
||||||
|
&button_load_mem_defaults,
|
||||||
&button_return
|
&button_return
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -483,6 +482,17 @@ namespace ui {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
button_load_mem_defaults.on_select = [&nav, this](Button&) {
|
||||||
|
nav.push<ModalMessageView>(
|
||||||
|
"Warning!",
|
||||||
|
"This will reset the persistent_memory\nand set the default settings",
|
||||||
|
YESNO,
|
||||||
|
[this](bool choice) {
|
||||||
|
if (choice) {
|
||||||
|
portapack::persistent_memory::cache::defaults();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
button_return.on_select = [&nav, this](Button&) {
|
button_return.on_select = [&nav, this](Button&) {
|
||||||
nav.pop();
|
nav.pop();
|
||||||
|
@ -464,15 +464,20 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
Button button_save_mem_to_file {
|
Button button_save_mem_to_file {
|
||||||
{ 0, 9 * 16, 240, 32 },
|
{ 0, 8 * 16, 240, 32 },
|
||||||
"save p.mem to sdcard"
|
"save p.mem to sdcard"
|
||||||
};
|
};
|
||||||
|
|
||||||
Button button_load_mem_from_file {
|
Button button_load_mem_from_file {
|
||||||
{ 0, 12 * 16, 240, 32 },
|
{ 0, 10 * 16 + 4 , 240, 32 },
|
||||||
"load p.mem from sdcard"
|
"load p.mem from sdcard"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Button button_load_mem_defaults {
|
||||||
|
{ 0, 12 * 16 + 8 , 240, 32 },
|
||||||
|
"!! reset p.mem, load defaults !!"
|
||||||
|
};
|
||||||
|
|
||||||
Button button_return {
|
Button button_return {
|
||||||
{ 16 * 8, 16 * 16, 12 * 8, 32 },
|
{ 16 * 8, 16 * 16, 12 * 8, 32 },
|
||||||
"Return",
|
"Return",
|
||||||
|
Loading…
Reference in New Issue
Block a user