@@ -392,12 +392,7 @@ void Note::LayoutSelector() {
392392 UIButton octaveModeBtn;
393393 octaveModeBtn.SetName (" Octave Mode" );
394394 octaveModeBtn.SetColorFunc ([&]() -> Color { return Color (0xFFFF00 ).DimIfNot (notePadConfigs[activeConfig].mode == OCTAVE_LAYOUT); });
395- octaveModeBtn.OnPress ([&]() -> void {
396- if (notePadConfigs[activeConfig].mode != OCTAVE_LAYOUT)
397- {
398- notePadConfigs[activeConfig].mode = OCTAVE_LAYOUT;
399- }
400- });
395+ octaveModeBtn.OnPress ([&]() -> void { notePadConfigs[activeConfig].mode = OCTAVE_LAYOUT; });
401396 layoutSelector.AddUIComponent (octaveModeBtn, Point (2 , 0 ));
402397
403398 UIButton offsetModeBtn;
@@ -413,16 +408,17 @@ void Note::LayoutSelector() {
413408 });
414409 layoutSelector.AddUIComponent (offsetModeBtn, Point (3 , 0 ));
415410
411+ UIButton chromaticModeBtn;
412+ chromaticModeBtn.SetName (" Chromatic Mode" );
413+ chromaticModeBtn.SetColorFunc ([&]() -> Color { return Color (0xFFFF00 ).DimIfNot (notePadConfigs[activeConfig].mode == CHROMATIC_LAYOUT); });
414+ chromaticModeBtn.OnPress ([&]() -> void { notePadConfigs[activeConfig].mode = CHROMATIC_LAYOUT; });
415+ layoutSelector.AddUIComponent (chromaticModeBtn, Point (4 , 0 ));
416+
416417 UIButton pianoModeBtn;
417418 pianoModeBtn.SetName (" Piano Mode" );
418419 pianoModeBtn.SetColorFunc ([&]() -> Color { return Color (0xFFFF00 ).DimIfNot (notePadConfigs[activeConfig].mode == PIANO_LAYOUT); });
419- pianoModeBtn.OnPress ([&]() -> void {
420- if (notePadConfigs[activeConfig].mode != PIANO_LAYOUT)
421- {
422- notePadConfigs[activeConfig].mode = PIANO_LAYOUT;
423- }
424- });
425- layoutSelector.AddUIComponent (pianoModeBtn, Point (4 , 0 ));
420+ pianoModeBtn.OnPress ([&]() -> void { notePadConfigs[activeConfig].mode = PIANO_LAYOUT; });
421+ layoutSelector.AddUIComponent (pianoModeBtn, Point (5 , 0 ));
426422
427423 // Offset Mode
428424 UISelector yOffsetInput;
@@ -465,7 +461,7 @@ void Note::LayoutSelector() {
465461 inKeyNoteOnlyToggle.SetName (" In Key Notes Only" );
466462 inKeyNoteOnlyToggle.SetColorFunc ([&]() -> Color { return Color (0xFFFFFF ).DimIfNot (notePadConfigs[activeConfig].inKeyNoteOnly ); });
467463 inKeyNoteOnlyToggle.OnPress ([&]() -> void { notePadConfigs[activeConfig].inKeyNoteOnly = !notePadConfigs[activeConfig].inKeyNoteOnly ; });
468- inKeyNoteOnlyToggle.SetEnableFunc ([&]() -> bool { return notePadConfigs[activeConfig].mode == OCTAVE_LAYOUT || notePadConfigs[activeConfig].mode == OFFSET_LAYOUT; });
464+ inKeyNoteOnlyToggle.SetEnableFunc ([&]() -> bool { return notePadConfigs[activeConfig].mode == OCTAVE_LAYOUT || notePadConfigs[activeConfig].mode == OFFSET_LAYOUT || notePadConfigs[activeConfig]. mode == CHROMATIC_LAYOUT; ; });
469465 layoutSelector.AddUIComponent (inKeyNoteOnlyToggle, Point (0 , 7 ));
470466
471467 layoutSelector.Start ();
0 commit comments