simpleterm/lib.rs
1#![warn(missing_docs)]
2#![warn(missing_doc_code_examples)]
3
4//! 
5//!
6//! Simpleterm is a bespoke fake terminal created with piston_window.
7//!
8//! It lets you create a window, send messages to it, grab input from the user, and display ascii art!
9//! You can also change the terminal's settings at any time, allowing you to create complicated scripts of actions.
10//!
11//! 
12//!
13//! ## Getting Started
14//!
15//! 1. Run the example with "cargo run"
16//! 2. Examine the example main.rs file and read up on the [Terminal functions](terminal/struct.Terminal.html)
17//! 3. Write you own script in main.rs and try it out!
18//!
19//! ## License
20//!
21//! This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/tjhaskel/rust_simpleterm/blob/master/LICENSE.md) file for details
22
23use std::time::Duration;
24
25/// Ascii art strings.
26pub mod art;
27
28/// Draws rectangles and text on the terminal window.
29pub mod draw;
30
31/// Creates and interacts with a terminal window.
32pub mod terminal;
33
34/// Contains functions related to text color and bounds.
35pub mod text;
36
37/// Indicates the x and y offset of the text and surrounding box from the corners of the terminal window.
38pub const TEXT_OFFSET: (f64, f64) = (25.0, 50.0);
39
40/// How long should elements like "Press Enter to Continue" or the input cursor take before toggling their flash state.
41pub const FLASH_TIME: Duration = Duration::from_millis(500);
42
43/// How long should the terminal take to type a single character when displaying a message.
44pub const TYPE_TIME: Duration = Duration::from_millis(20);