From cbb4b1f06b2395705851430742e23240ece90510 Mon Sep 17 00:00:00 2001 From: dam Date: Fri, 16 Feb 2024 02:33:20 +0000 Subject: Base implementation of TUI/windows. --- ttt.jai | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index 8987a77..072d671 100644 --- a/ttt.jai +++ b/ttt.jai @@ -1280,15 +1280,14 @@ main :: () { if 1 { print("TEST : draw box\n", to_standard_error = true); auto_release_temp(); - TUI.start(); + TUI.start(); // TODO Should start() call flush_input internally? + TUI.flush_input(); TUI.clear_terminal(); TUI.draw_box(1, 2, 5, 3); TUI.set_cursor_position(1, 1); print("Can you see the box below? (y/n)"); key := TUI.get_key(); TUI.stop(); - - print("\n\n\rDEBUG DEBUG WIP WIP WIP TODO HACK\n\n\r>%<\n\r", TUI.to_string(key)); // TODO WIP Currently debugging this. assert(key == #char "y", "# Failed to draw box.\n"); print("- success\n", to_standard_error = true); } @@ -1325,7 +1324,8 @@ main :: () { assert(key == #char "y", "# Failed to set terminal title.\n"); print("- success\n", to_standard_error = true); } - + + // TODO Setup this test... check for Meta+FX or Ctrl+FX compatibility between windows and *nix. if 1 { print("TEST : print keys and set terminal title\n", to_standard_error = true); TUI.start(); -- cgit v1.2.3