Feat: add hidden mode and new documentation
This commit is contained in:
@@ -26,7 +26,7 @@ use crate::page::Page;
|
||||
use crate::state::{
|
||||
undo::UndoHistory, AudioSettings, EditorContext, LiveKeyState, Metrics, Modal, MuteState,
|
||||
OptionsState, PanelState, PatternField, PatternPropsField, PatternsNav, PlaybackState,
|
||||
ProjectState, UiState,
|
||||
ProjectState, ScriptEditorState, UiState,
|
||||
};
|
||||
|
||||
static COMPLETION_CANDIDATES: LazyLock<Vec<CompletionCandidate>> = LazyLock::new(|| {
|
||||
@@ -49,6 +49,7 @@ pub struct App {
|
||||
|
||||
pub page: Page,
|
||||
pub editor_ctx: EditorContext,
|
||||
pub script_editor: ScriptEditorState,
|
||||
|
||||
pub patterns_nav: PatternsNav,
|
||||
|
||||
@@ -104,6 +105,7 @@ impl App {
|
||||
|
||||
page: Page::default(),
|
||||
editor_ctx: EditorContext::default(),
|
||||
script_editor: ScriptEditorState::default(),
|
||||
|
||||
patterns_nav: PatternsNav::default(),
|
||||
|
||||
@@ -169,6 +171,18 @@ impl App {
|
||||
self.project_state.project.pattern_at(bank, pattern)
|
||||
}
|
||||
|
||||
pub fn open_script_modal(&mut self, field: crate::state::ScriptField) {
|
||||
use crate::state::ScriptField;
|
||||
let current = match field {
|
||||
ScriptField::Speed => self.project_state.project.script_speed.label().to_string(),
|
||||
ScriptField::Length => self.project_state.project.script_length.to_string(),
|
||||
};
|
||||
self.ui.modal = Modal::SetScript {
|
||||
field,
|
||||
input: current,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn open_pattern_modal(&mut self, field: PatternField) {
|
||||
let current = match field {
|
||||
PatternField::Length => self.current_edit_pattern().length.to_string(),
|
||||
|
||||
Reference in New Issue
Block a user