dialogos 0.1.1

A super simple dialogue system for Rust.
Documentation
  • Coverage
  • 82.22%
    37 out of 45 items documented6 out of 26 items with examples
  • Size
  • Source code size: 19.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 665.6 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Kapendev/dialogos
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Kapendev

📝 Dialogos

A super simple dialogue system for Rust.

It's nothing special, but that's the point! It's something that just works. This library is ideal for games that are made for a game jam. For more complex games I would recommend extending Dialogos or using something else.

🌽 Features

  • Easy to use
  • Labels
  • Menus
  • Variables
  • Mathematical operations
  • Conditional statements

🍄 Installation

Add Dialogos as a dependency to Cargo.toml

[dependencies]
dialogos = { git = "https://github.com/AlexandrosKap/dialogos" }

And then open the documentation with

cargo doc --open

🍅 Example

A Hello World example

use dialogos::*;

fn main() {
    let alex = |cont| text("Alex", cont);

    let mut d = Dialogue::new(vec![
        alex("Hello world."),
        alex("Something something."),
        alex("The end."),
    ]);

    while !d.has_end() {
        let line = d.line();
        println!("{}: {}", line.info, line.cont);
        d.next();
    }
}