From 089c649ee3e9b219ff90d88a2aad95e730507410 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Wed, 10 Mar 2021 00:17:44 +0100 Subject: Create tests windows --- src/main.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main.rs') 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); }); } -- cgit v1.2.1