aboutsummaryrefslogtreecommitdiff
path: root/ttt.jai
diff options
context:
space:
mode:
authordam <dam@gudinoff>2024-05-07 18:14:45 +0100
committerdam <dam@gudinoff>2024-05-07 18:14:45 +0100
commit89157d00fc4110055d5816cd1897e4def120bcaf (patch)
treeb7aa8643d9b9d55258c02ff866e2ca185ac77c70 /ttt.jai
parent63c21762a8d8323facaf729a1bd17e9449eea72e (diff)
downloadtask-time-tracker-89157d00fc4110055d5816cd1897e4def120bcaf.tar.zst
task-time-tracker-89157d00fc4110055d5816cd1897e4def120bcaf.zip
Fixed two very nasty bugs.
Diffstat (limited to 'ttt.jai')
-rw-r--r--ttt.jai2
1 files changed, 2 insertions, 0 deletions
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);