diff options
| author | Arne Dußin | 2021-01-06 21:32:48 +0100 |
|---|---|---|
| committer | Arne Dußin | 2021-01-06 21:32:48 +0100 |
| commit | 61d255a420c9d977b46670e7fa9e7735d2acf819 (patch) | |
| tree | d1cf79fec1b643814568544c3691e25564ae874a /src/main.rs | |
| parent | 9b5762cf3716503819e2cf06f3c335bbfd3b0a3c (diff) | |
| download | graf_karto-61d255a420c9d977b46670e7fa9e7735d2acf819.tar.gz graf_karto-61d255a420c9d977b46670e7fa9e7735d2acf819.zip | |
Add CLI with save feature
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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); } } } |
