mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-23 21:33:10 -05:00
Setting for faster Button Repeat delays (#2559)
* Setting for faster Button Repeat delays * Tweak fast delay times * Tweak delay times * Added description line and tweaked delay again
This commit is contained in:
parent
b4112f0c04
commit
6ee7270db7
6 changed files with 115 additions and 11 deletions
|
|
@ -721,6 +721,36 @@ void SetEncoderDialView::focus() {
|
|||
button_save.focus();
|
||||
}
|
||||
|
||||
/* SetButtonsView ************************************/
|
||||
|
||||
SetButtonsView::SetButtonsView(NavigationView& nav) {
|
||||
add_children({&labels,
|
||||
&button_save,
|
||||
&button_cancel,
|
||||
&field_repeat_delay,
|
||||
&field_repeat_speed,
|
||||
&field_long_press_delay});
|
||||
|
||||
field_repeat_delay.set_by_value(pmem::ui_button_repeat_delay());
|
||||
field_repeat_speed.set_by_value(pmem::ui_button_repeat_speed());
|
||||
field_long_press_delay.set_by_value(pmem::ui_button_long_press_delay());
|
||||
|
||||
button_save.on_select = [&nav, this](Button&) {
|
||||
pmem::set_ui_button_repeat_delay(field_repeat_delay.selected_index_value());
|
||||
pmem::set_ui_button_repeat_speed(field_repeat_speed.selected_index_value());
|
||||
pmem::set_ui_button_long_press_delay(field_long_press_delay.selected_index_value());
|
||||
nav.pop();
|
||||
};
|
||||
|
||||
button_cancel.on_select = [&nav, this](Button&) {
|
||||
nav.pop();
|
||||
};
|
||||
}
|
||||
|
||||
void SetButtonsView::focus() {
|
||||
button_save.focus();
|
||||
}
|
||||
|
||||
/* AppSettingsView ************************************/
|
||||
|
||||
AppSettingsView::AppSettingsView(
|
||||
|
|
@ -1067,6 +1097,7 @@ void SettingsMenuView::on_populate() {
|
|||
{"Converter", ui::Color::dark_cyan(), &bitmap_icon_options_radio, [this]() { nav_.push<SetConverterSettingsView>(); }},
|
||||
{"Date/Time", ui::Color::dark_cyan(), &bitmap_icon_options_datetime, [this]() { nav_.push<SetDateTimeView>(); }},
|
||||
{"Encoder Dial", ui::Color::dark_cyan(), &bitmap_icon_setup, [this]() { nav_.push<SetEncoderDialView>(); }},
|
||||
{"Button Speed", ui::Color::dark_cyan(), &bitmap_icon_controls, [this]() { nav_.push<SetButtonsView>(); }},
|
||||
{"Freq. Correct", ui::Color::dark_cyan(), &bitmap_icon_options_radio, [this]() { nav_.push<SetFrequencyCorrectionView>(); }},
|
||||
{"P.Memory Mgmt", ui::Color::dark_cyan(), &bitmap_icon_memory, [this]() { nav_.push<SetPersistentMemoryView>(); }},
|
||||
{"Radio", ui::Color::dark_cyan(), &bitmap_icon_options_radio, [this]() { nav_.push<SetRadioView>(); }},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue