pub struct InputModal {
pub open: bool,
pub kind: InputModalKind,
pub buffer: String,
pub cursor: usize,
}Fields§
§open: bool§kind: InputModalKind§buffer: String§cursor: usizeImplementations§
Source§impl InputModal
impl InputModal
pub fn new() -> Self
Sourcepub fn open_save(&mut self, default_name: &str)
pub fn open_save(&mut self, default_name: &str)
Ask for a filename to save under.
The field starts in sessions/ when the working directory has one —
a checkout being run from its own root, which is where every session
on disk already is — and in the absolute <app dir>/sessions/
otherwise. A bare sessions/ resolves against wherever the process was
started, so a shortcut, an alias or a desktop launcher would write the
file successfully into a directory nobody is going to look in again.
See crate::paths::session_prompt_dir.
Sourcepub fn open_load(&mut self)
pub fn open_load(&mut self)
Ask for a file to open. Same starting directory as Self::open_save;
a relative path typed here is also looked for under the application
directory, so the way a checkout spells a session keeps working from
anywhere. See crate::paths::find_session.
Sourcepub fn open_preset_name(&mut self)
pub fn open_preset_name(&mut self)
Name a user preset. Starts empty rather than on a suggestion, because a suggestion the player accepts by reflex is how a bank fills up with eight sounds called “juno”.