diff options
author | Nao Pross <np@0hm.ch> | 2021-03-10 00:17:44 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-03-10 00:17:44 +0100 |
commit | 089c649ee3e9b219ff90d88a2aad95e730507410 (patch) | |
tree | b67e332d013f97efd83d9bf74626a6b999758c95 /src/main.rs | |
parent | Update .gitignore (diff) | |
download | testbench-ui-089c649ee3e9b219ff90d88a2aad95e730507410.tar.gz testbench-ui-089c649ee3e9b219ff90d88a2aad95e730507410.zip |
Create tests windows
Diffstat (limited to '')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index df1a475..9e7d545 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use imgui::*; use rlua::{Lua, MultiValue}; mod support; +mod testbench; #[derive(Default)] struct State { @@ -21,7 +22,9 @@ impl State { } fn draw_console(_run: &mut bool, ui: &mut Ui, state: &mut State) { - let win = Window::new(im_str!("Lua Console")).size([400., 500.], Condition::Appearing); + let win = Window::new(im_str!("Lua Console")) + .size([400., 500.], Condition::Appearing) + .position([440., 20.], Condition::Appearing); win.build(&ui, || { ChildWindow::new("console") @@ -35,7 +38,7 @@ fn draw_console(_run: &mut bool, ui: &mut Ui, state: &mut State) { ui.separator(); ui.input_text(im_str!("Lua"), &mut state.repl_input).build(); - ui.same_line(350.); + ui.same_line(0.); if ui.button(im_str!("Eval"), [0., 0.]) { let input = state.repl_input.to_str().clone(); let mut new_text = String::new(); @@ -67,9 +70,11 @@ fn draw_console(_run: &mut bool, ui: &mut Ui, state: &mut State) { fn main() { let system = support::init(file!()); let mut state = State::new(); + let mut bench = testbench::Bench::new(); system.main_loop(move |run, ui| { - ui.show_demo_window(run); + // ui.show_demo_window(run); + bench.draw(run, ui); draw_console(run, ui, &mut state); }); } |