aboutsummaryrefslogtreecommitdiff
path: root/ttt.jai
diff options
context:
space:
mode:
authordam <devnull@localhost>2024-02-10 02:53:54 +0000
committerdam <devnull@localhost>2024-02-10 02:53:54 +0000
commit4aa3ae769bc079dd5cbd3419cc44b1d95986f837 (patch)
tree3cdb560516c72811dd4b9f19e4876f3f0f9ea9e3 /ttt.jai
parente8ddaf3289a836c10f45b1b8c019922a99393488 (diff)
downloadtask-time-tracker-4aa3ae769bc079dd5cbd3419cc44b1d95986f837.tar.zst
task-time-tracker-4aa3ae769bc079dd5cbd3419cc44b1d95986f837.zip
Fixed some windows OS_ procedures. Simplified and fixed get_key().
Diffstat (limited to 'ttt.jai')
-rw-r--r--ttt.jai23
1 files changed, 13 insertions, 10 deletions
diff --git a/ttt.jai b/ttt.jai
index d4a5320..6759342 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -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