ui crate, editor
This commit is contained in:
@@ -31,6 +31,8 @@ pub enum InputMode {
|
||||
Editor,
|
||||
/// A dialog overlay is open over the editor; all input drives the dialog.
|
||||
Dialog,
|
||||
/// The script code editor is open; all input drives the editor.
|
||||
CodeEditor,
|
||||
/// An animation is running and has not claimed any input mode; all input is discarded.
|
||||
Ignore,
|
||||
/// Reserved for a post-transition freeze; nothing currently produces this mode.
|
||||
@@ -54,6 +56,8 @@ pub(crate) fn current_input_mode(mode: &Mode, ui: &Ui) -> InputMode {
|
||||
Mode::Edit(ed) => {
|
||||
if ed.dialog.is_some() {
|
||||
InputMode::Dialog
|
||||
} else if ed.code_editor.is_some() {
|
||||
InputMode::CodeEditor
|
||||
} else {
|
||||
InputMode::Editor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user