diff options
Diffstat (limited to 'ttt.jai')
| -rw-r--r-- | ttt.jai | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -1237,13 +1237,6 @@ main :: () { // -- -- -- Testing TUI -- START - // TODO Test input - - { - TUI.test(); - exit(0); - } - if 1 { print("TEST : set and get cursor position --\n", to_standard_error = true); TUI.start(); @@ -1268,8 +1261,16 @@ main :: () { while(key != #char "q") { __mark := get_temporary_storage_mark(); key = TUI.get_key(1000); - if key >= 32 && key <= 128 then print_character(cast,force(u8)key); - else write_string("-"); + if key == TUI.Keys.None { + write_string("-"); + } + else if key == TUI.Keys.Resize { + write_string("#"); + } + else { + // else if key >= 32 && key <= 128 then print_character(cast,force(u8)key) + write_string(TUI.to_string(key)); + } set_temporary_storage_mark(__mark); } TUI.stop(); @@ -1307,7 +1308,7 @@ main :: () { print("> success\n", to_standard_error = true); } - #if 1 { + if 1 { print("TEST : print keys and set terminal title --\n", to_standard_error = true); TUI.start(); TUI.set_terminal_title("bazinga"); @@ -1400,6 +1401,8 @@ main :: () { TUI.stop(); } + write_string("DONE"); + exit(0); // -- -- -- Testing TUI -- STOP |
