diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 8ddc587..8c1d63e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,22 @@ +//! # Graf Karto cartographer +//! +//! ### What is it exactly +//! Graf Karto is a table top role playing game (TTRPG) map creation tool that is optimised for real +//! time map interaction. +//! +//! ### Motivation +//! While there are certainly many TTRPG map creation tools for single user and multi user available +//! online and on the market, we felt that most of them lack features or are to unwieldy to seriously +//! consider for real time dungeon drawing, say for instance when drawing a map for an old school +//! revival style game. This is why Graf Karto is optimised for speed above pretty graphical features. +//! The aim is for the user not to have to think much about how they are going to achieve what they are +//! doing and how they are going to make it pretty, but should just be able to *do* it, to have time to +//! worry about other things. This does not mean that all maps created should visually be equivalent to +//! a steaming pile of hot garbage, but if the visuals should try to get in the way, usability and speed +//! takes precedence. + #![allow(dead_code)] +#![warn(missing_docs)] #[macro_use] extern crate log; @@ -6,26 +24,27 @@ extern crate log; pub mod button; pub mod colours; pub mod config; -pub mod dimension_indicator; pub mod editor; pub mod grid; pub mod gui; pub mod map; pub mod math; -pub mod scaleable; pub mod svg; pub mod tool; pub mod transform; +pub mod transformable; use config::Config; use editor::Editor; -use gui::ToolSidebar; +use gui::{DimensionIndicator, ToolSidebar}; use raylib::prelude::*; use std::ffi::CString; use std::io; use transform::Transform; +/// Location of the file containing the style used for the raylib user interface. pub const GUI_STYLE: &str = "assets/style/cyber.rgs"; +/// Location of the graf karto configuration options file. pub const CONFIG_FILE: &str = "config.ron"; fn main() { @@ -65,6 +84,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 transform = Transform::new(); @@ -90,6 +110,8 @@ fn main() { ); } + dimension_indicator.update(editor.map_mut(), &mut rl); + editor.update( &mut rl, &transform, @@ -105,6 +127,8 @@ fn main() { editor.draw_tools(&mut d, &transform); tool_sidebar.draw(screen_height as u16, &mut d, &mut editor); + + dimension_indicator.draw(&mut d, &transform); } } } |
