mod stats;
mod class;
mod creature;
mod body;
mod tests;
mod types;
mod npc;
mod random;
mod equation;
mod special;
mod attributes;
mod effect;
mod item;
extern crate clap;
use clap::{App, load_yaml};
#[cfg(feature = "fltkform")]
use fltk::{prelude::*, *};
#[cfg(feature = "fltkform")]
use fltk_form::{FltkForm, HasProps};
#[cfg(feature = "fltkform")]
fn fltk_main() {
use crate::creature::Stats as Stats;
let app = app::App::default().with_scheme(app::Scheme::Gtk);
app::set_background_color(222, 222, 222);
let mut win = window::Window::default().with_size(400, 300);
let my_struct = Stats::default();
let grp = group::Scroll::default()
.with_size(300, 200)
.center_of_parent();
let form = my_struct.view();
grp.end();
let mut btn = button::Button::default()
.with_label("print")
.with_size(80, 30)
.below_of(&grp, 5)
.center_x(&grp);
win.end();
win.show();
btn.set_callback(move |_| {
println!("{:?}", form.get_props()); });
while app.wait() {
win.redraw();
}
}
fn main() {
#[cfg(feature = "fltkform")]
{
fltk_main();
return;
}
let yaml = load_yaml!("cli.yaml");
let matches = App::from(yaml).get_matches();
if let Some(matches) = matches.subcommand_matches("stats") {
if matches.is_present("Basic_stat") {
}
}
if let Some(matches) = matches.subcommand_matches("class") {
if matches.is_present("Basic_class") {
}
}
if let Some(matches) = matches.subcommand_matches("type") {
if matches.is_present("Rate") {
}
if matches.is_present("Element") {
}
}
}