From 37f3a0f812f0b408c323c7c240197ec3c3a1e2f7 Mon Sep 17 00:00:00 2001 From: dam Date: Wed, 3 Jan 2024 01:47:04 +0000 Subject: WIP - implementing user line input. --- ttt.jai | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index 4e63204..654cde4 100644 --- a/ttt.jai +++ b/ttt.jai @@ -1239,7 +1239,7 @@ main :: () { // TODO Test input - if 1 { + if 0 { print("TEST : set and get cursor position --\n", to_standard_error = true); TUI.start(); ROW :: 3; @@ -1251,7 +1251,7 @@ main :: () { print("> success\n", to_standard_error = true); } - if 1 { + if 0 { print("TEST : test key input --\n", to_standard_error = true); auto_release_temp(); TUI.start(); @@ -1271,7 +1271,7 @@ main :: () { print("> success\n", to_standard_error = true); } - if 1 { + if 0 { print("TEST : draw box --\n", to_standard_error = true); auto_release_temp(); TUI.start(); @@ -1285,7 +1285,7 @@ main :: () { print("> success\n", to_standard_error = true); } - if 1 { + if 0 { print("TEST : get terminal size --\n", to_standard_error = true); auto_release_temp(); TUI.start(); @@ -1303,7 +1303,7 @@ main :: () { } #if 1 { - print("test 5\n", to_standard_error = true); + print("TEST : print keys and set terminal title --\n", to_standard_error = true); TUI.start(); TUI.set_terminal_title("bazinga"); xcolumns, xrows: int; @@ -1372,7 +1372,7 @@ main :: () { TUI.set_cursor_position(1, 1); print("Enter some text (use Enter to finish, Esc to cancel, or resize to abort):"); TUI.set_cursor_position(2, 1); - str, key := TUI.user_line_input(); + str, key := TUI.user_line_input(15); TUI.set_cursor_position(3, 1); if key == { case TUI.Keys.Escape; { -- cgit v1.2.3