From 89157d00fc4110055d5816cd1897e4def120bcaf Mon Sep 17 00:00:00 2001 From: dam Date: Tue, 7 May 2024 18:14:45 +0100 Subject: Fixed two very nasty bugs. --- ttt.jai | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index ff3c757..612e6b6 100644 --- a/ttt.jai +++ b/ttt.jai @@ -218,6 +218,7 @@ print_time :: (y: int, x: int, time: s64, space: int) -> int { assert(size >= 0, "Cannot print negative padding values. The procedure accepts signed values just for convenience."); auto_release_temp(); padding := talloc_string(size); + padding.count = size; memset(padding.data, char, size); TUI.tui_write(padding); } @@ -1131,6 +1132,7 @@ read_input_string :: (x: int, y: int, input_limit: int, padding: int = 0) -> val // TODO Draw padding (at end of inputbox)... padding was renamed to input_width... is this the best name? // TODO Maybe add another optional arg with the placeholder text (to be preset on the input)? + // TODO COULD CACHE... but there's not need... TUI.set_cursor_position(x + input_limit, y); write_string(TUI.Commands.DrawingMode); -- cgit v1.2.3