A lightweight terminal made with OpenGL from the ground-up.
With this terminal, you're able to make the terminal applications or games you've always wanted, but with a terminal that looks the same for everyone, because it's made with OpenGL and doesn't use the computer's native terminal!
Currently supported features include:
- Moving the cursor within the Terminal
- Changing foreground and background colors to whatever you want!
- Shaking text
- A text-parser that will make it easy to write whatever you want and make it look cool!
- Parseable text example: "Hello, [fg=red]this is red[/fg] and [shake=1.0]this is shaking[/shake]."
Extensive documentation can be found at: docs.rs.
Just add the following line to your Cargo.toml
:
toml
[dependencies]
glerminal = "0.1.0"
And simply add the following line to your main.rs
:
rust
extern crate glerminal;
And then using this crate is quite simple: ```rust extern crate glerminal;
use glerminal::terminal::TerminalBuilder; use glerminal::text_buffer::TextBuffer;
fn main() { let terminal = TerminalBuilder::new() .withtitle("Hello GLerminal!") .withdimensions((1280, 720)) .build(); let textbuffer; match TextBuffer::new(&terminal, (80, 24)) { Ok(buffer) => textbuffer = buffer, Err(error) => panic!(format!("Failed to initialize text buffer: {}", error)), }
text_buffer.write("Hello, GLerminal!");
terminal.flush(&mut text_buffer);
while terminal.refresh() {
terminal.draw(&text_buffer);
}
} ```
This crate is distributed under the terms of the MIT License.
This crate also uses a font as a default font, called Iosevka, which is distributed under the terms of SIL OFL Version 1.1.