From 61d255a420c9d977b46670e7fa9e7735d2acf819 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Wed, 6 Jan 2021 21:32:48 +0100 Subject: Add CLI with save feature --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 1cfc31b..78be56b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,6 +22,7 @@ extern crate log; pub mod button; +pub mod cli; pub mod colours; pub mod config; pub mod editor; @@ -34,6 +35,7 @@ pub mod tool; pub mod transform; pub mod transformable; +use cli::CLI; use config::Config; use editor::Editor; use gui::{DimensionIndicator, ToolSidebar}; @@ -86,6 +88,7 @@ fn main() { let mut editor = Editor::new(&mut rl, &thread, config); let mut dimension_indicator = DimensionIndicator::new(); let tool_sidebar = ToolSidebar::new(&mut rl, &thread); + let mut cli = CLI::new(); let mut transform = Transform::new(); let mut last_mouse_pos = rl.get_mouse_position(); @@ -110,8 +113,8 @@ fn main() { ); } + cli.update(&mut rl, &mut editor); dimension_indicator.update(editor.map_mut(), &mut rl); - editor.update( &mut rl, &transform, @@ -129,6 +132,7 @@ fn main() { gui::position_indicator_draw(&mut d, last_mouse_pos.into(), &transform); dimension_indicator.draw(&mut d, &transform); tool_sidebar.draw(screen_height as u16, &mut d, &mut editor); + cli.draw(&mut d); } } } -- cgit v1.2.3-70-g09d2