This commit is contained in:
@@ -9,6 +9,7 @@ pub enum OptionsFocus {
|
||||
RuntimeHighlight,
|
||||
ShowScope,
|
||||
ShowSpectrum,
|
||||
ShowLissajous,
|
||||
ShowCompletion,
|
||||
ShowPreview,
|
||||
PerformanceMode,
|
||||
@@ -38,6 +39,7 @@ impl CyclicEnum for OptionsFocus {
|
||||
Self::RuntimeHighlight,
|
||||
Self::ShowScope,
|
||||
Self::ShowSpectrum,
|
||||
Self::ShowLissajous,
|
||||
Self::ShowCompletion,
|
||||
Self::ShowPreview,
|
||||
Self::PerformanceMode,
|
||||
@@ -93,30 +95,31 @@ const FULL_LAYOUT: &[(OptionsFocus, usize)] = &[
|
||||
(OptionsFocus::RuntimeHighlight, 5),
|
||||
(OptionsFocus::ShowScope, 6),
|
||||
(OptionsFocus::ShowSpectrum, 7),
|
||||
(OptionsFocus::ShowCompletion, 8),
|
||||
(OptionsFocus::ShowPreview, 9),
|
||||
(OptionsFocus::PerformanceMode, 10),
|
||||
(OptionsFocus::Font, 11),
|
||||
(OptionsFocus::ZoomFactor, 12),
|
||||
(OptionsFocus::WindowSize, 13),
|
||||
// blank=14, ABLETON LINK header=15, divider=16
|
||||
(OptionsFocus::LinkEnabled, 17),
|
||||
(OptionsFocus::StartStopSync, 18),
|
||||
(OptionsFocus::Quantum, 19),
|
||||
// blank=20, SESSION header=21, divider=22, Tempo=23, Beat=24, Phase=25
|
||||
// blank=26, MIDI OUTPUTS header=27, divider=28
|
||||
(OptionsFocus::MidiOutput0, 29),
|
||||
(OptionsFocus::MidiOutput1, 30),
|
||||
(OptionsFocus::MidiOutput2, 31),
|
||||
(OptionsFocus::MidiOutput3, 32),
|
||||
// blank=33, MIDI INPUTS header=34, divider=35
|
||||
(OptionsFocus::MidiInput0, 36),
|
||||
(OptionsFocus::MidiInput1, 37),
|
||||
(OptionsFocus::MidiInput2, 38),
|
||||
(OptionsFocus::MidiInput3, 39),
|
||||
// blank=40, ONBOARDING header=41, divider=42
|
||||
(OptionsFocus::ResetOnboarding, 43),
|
||||
(OptionsFocus::LoadDemoOnStartup, 44),
|
||||
(OptionsFocus::ShowLissajous, 8),
|
||||
(OptionsFocus::ShowCompletion, 9),
|
||||
(OptionsFocus::ShowPreview, 10),
|
||||
(OptionsFocus::PerformanceMode, 11),
|
||||
(OptionsFocus::Font, 12),
|
||||
(OptionsFocus::ZoomFactor, 13),
|
||||
(OptionsFocus::WindowSize, 14),
|
||||
// blank=15, ABLETON LINK header=16, divider=17
|
||||
(OptionsFocus::LinkEnabled, 18),
|
||||
(OptionsFocus::StartStopSync, 19),
|
||||
(OptionsFocus::Quantum, 20),
|
||||
// blank=21, SESSION header=22, divider=23, Tempo=24, Beat=25, Phase=26
|
||||
// blank=27, MIDI OUTPUTS header=28, divider=29
|
||||
(OptionsFocus::MidiOutput0, 30),
|
||||
(OptionsFocus::MidiOutput1, 31),
|
||||
(OptionsFocus::MidiOutput2, 32),
|
||||
(OptionsFocus::MidiOutput3, 33),
|
||||
// blank=34, MIDI INPUTS header=35, divider=36
|
||||
(OptionsFocus::MidiInput0, 37),
|
||||
(OptionsFocus::MidiInput1, 38),
|
||||
(OptionsFocus::MidiInput2, 39),
|
||||
(OptionsFocus::MidiInput3, 40),
|
||||
// blank=41, ONBOARDING header=42, divider=43
|
||||
(OptionsFocus::ResetOnboarding, 44),
|
||||
(OptionsFocus::LoadDemoOnStartup, 45),
|
||||
];
|
||||
|
||||
impl OptionsFocus {
|
||||
@@ -172,13 +175,13 @@ fn visible_layout(plugin_mode: bool) -> Vec<(OptionsFocus, usize)> {
|
||||
// based on which sections are hidden.
|
||||
let mut offset: usize = 0;
|
||||
|
||||
// Font/Zoom/Window lines (11,12,13) hidden when !plugin_mode
|
||||
// Font/Zoom/Window lines (12,13,14) hidden when !plugin_mode
|
||||
if !plugin_mode {
|
||||
offset += 3; // 3 lines for Font, ZoomFactor, WindowSize
|
||||
}
|
||||
|
||||
// Link + Session + MIDI sections hidden when plugin_mode
|
||||
// These span from blank(14) through MidiInput3(39) = 26 lines
|
||||
// These span from blank(15) through MidiInput3(40) = 26 lines
|
||||
if plugin_mode {
|
||||
let link_section_lines = 26;
|
||||
offset += link_section_lines;
|
||||
@@ -189,10 +192,10 @@ fn visible_layout(plugin_mode: bool) -> Vec<(OptionsFocus, usize)> {
|
||||
if !focus.is_visible(plugin_mode) {
|
||||
continue;
|
||||
}
|
||||
// Lines at or below index 10 (PerformanceMode) are never shifted
|
||||
let adjusted = if raw_line <= 10 {
|
||||
// Lines at or below index 11 (PerformanceMode) are never shifted
|
||||
let adjusted = if raw_line <= 11 {
|
||||
raw_line
|
||||
} else if !plugin_mode && raw_line <= 13 {
|
||||
} else if !plugin_mode && raw_line <= 14 {
|
||||
// Font/Zoom/Window — these are hidden, skip
|
||||
continue;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user