From 3d9e9a30f6ce5dee1775bdd1fbe28f07e41365b2 Mon Sep 17 00:00:00 2001 From: dam Date: Sun, 24 Dec 2023 01:13:08 +0000 Subject: Draw table and fixed totals position. --- TUI/module.jai | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'TUI/module.jai') diff --git a/TUI/module.jai b/TUI/module.jai index bb5b800..9014be7 100644 --- a/TUI/module.jai +++ b/TUI/module.jai @@ -43,11 +43,11 @@ Drawings :: struct { } Commands :: struct { - EnterAlternateBuffer :: "\e[?1049h"; - EnterMainBuffer :: "\e[?1049l"; + StartAlternateBuffer :: "\e[?1049h"; + StartMainBuffer :: "\e[?1049l"; - EnterDrawingMode :: "\e(0"; - EnterNormalMode :: "\e(B"; + StartDrawingMode :: "\e(0"; + StartNormalMode :: "\e(B"; ClearScreen :: "\e[2J"; ClearLine :: "\e[2K"; @@ -371,7 +371,7 @@ start :: () { input_string.count = 0; input_override = xx Keys.None; - write_strings(Commands.HideCursor, Commands.SaveCursorPosition, Commands.EnterAlternateBuffer, Commands.SetUTF8); + write_strings(Commands.HideCursor, Commands.SaveCursorPosition, Commands.StartAlternateBuffer, Commands.SetUTF8); OS_prepare_terminal(); initialized = true; @@ -382,7 +382,7 @@ stop :: () { initialized = false; OS_reset_terminal(); - write_strings(Commands.EnterMainBuffer, Commands.RestoreCursorPosition, Commands.ShowCursor); + write_strings(Commands.StartMainBuffer, Commands.RestoreCursorPosition, Commands.ShowCursor); } flush_input :: () { @@ -402,7 +402,7 @@ draw_box :: (x: int, y: int, width: int, height: int) { tmp_string = tprint(Commands.SetCursorPosition, y, x); write_strings( - Commands.EnterDrawingMode, + Commands.StartDrawingMode, tmp_string, Drawings.CornerTL ); @@ -431,7 +431,7 @@ draw_box :: (x: int, y: int, width: int, height: int) { } write_string(Drawings.CornerBR); - write_string(Commands.EnterNormalMode); + write_string(Commands.StartNormalMode); } // TODO Maybe rename to "clear()" -- cgit v1.2.3