mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-26 22:37:13 -05:00
Add + - buttons in Encoder dial settings (#2447)
This commit is contained in:
parent
af362600ef
commit
b47a5fe0c8
@ -707,11 +707,28 @@ SetEncoderDialView::SetEncoderDialView(NavigationView& nav) {
|
|||||||
&field_encoder_dial_sensitivity,
|
&field_encoder_dial_sensitivity,
|
||||||
&field_encoder_rate_multiplier,
|
&field_encoder_rate_multiplier,
|
||||||
&button_save,
|
&button_save,
|
||||||
&button_cancel});
|
&button_cancel,
|
||||||
|
&button_dial_sensitivity_plus,
|
||||||
|
&button_dial_sensitivity_minus,
|
||||||
|
&button_rate_multiplier_plus,
|
||||||
|
&button_rate_multiplier_minus});
|
||||||
|
|
||||||
field_encoder_dial_sensitivity.set_by_value(pmem::encoder_dial_sensitivity());
|
field_encoder_dial_sensitivity.set_by_value(pmem::encoder_dial_sensitivity());
|
||||||
field_encoder_rate_multiplier.set_value(pmem::encoder_rate_multiplier());
|
field_encoder_rate_multiplier.set_value(pmem::encoder_rate_multiplier());
|
||||||
|
|
||||||
|
button_dial_sensitivity_plus.on_select = [this](Button&) {
|
||||||
|
field_encoder_dial_sensitivity.on_encoder(1);
|
||||||
|
};
|
||||||
|
button_dial_sensitivity_minus.on_select = [this](Button&) {
|
||||||
|
field_encoder_dial_sensitivity.on_encoder(-1);
|
||||||
|
};
|
||||||
|
button_rate_multiplier_plus.on_select = [this](Button&) {
|
||||||
|
field_encoder_rate_multiplier.on_encoder(1);
|
||||||
|
};
|
||||||
|
button_rate_multiplier_minus.on_select = [this](Button&) {
|
||||||
|
field_encoder_rate_multiplier.on_encoder(-1);
|
||||||
|
};
|
||||||
|
|
||||||
button_save.on_select = [&nav, this](Button&) {
|
button_save.on_select = [&nav, this](Button&) {
|
||||||
pmem::set_encoder_dial_sensitivity(field_encoder_dial_sensitivity.selected_index_value());
|
pmem::set_encoder_dial_sensitivity(field_encoder_dial_sensitivity.selected_index_value());
|
||||||
pmem::set_encoder_rate_multiplier(field_encoder_rate_multiplier.value());
|
pmem::set_encoder_rate_multiplier(field_encoder_rate_multiplier.value());
|
||||||
|
@ -611,6 +611,22 @@ class SetEncoderDialView : public View {
|
|||||||
1,
|
1,
|
||||||
' '};
|
' '};
|
||||||
|
|
||||||
|
Button button_dial_sensitivity_plus{
|
||||||
|
{20 * 8, 4 * 16, 16, 16},
|
||||||
|
"+"};
|
||||||
|
|
||||||
|
Button button_dial_sensitivity_minus{
|
||||||
|
{20 * 8, 6 * 16, 16, 16},
|
||||||
|
"-"};
|
||||||
|
|
||||||
|
Button button_rate_multiplier_plus{
|
||||||
|
{20 * 8, 11 * 16, 16, 16},
|
||||||
|
"+"};
|
||||||
|
|
||||||
|
Button button_rate_multiplier_minus{
|
||||||
|
{20 * 8, 13 * 16, 16, 16},
|
||||||
|
"-"};
|
||||||
|
|
||||||
Button button_save{
|
Button button_save{
|
||||||
{2 * 8, 16 * 16, 12 * 8, 32},
|
{2 * 8, 16 * 16, 12 * 8, 32},
|
||||||
"Save"};
|
"Save"};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user