aboutsummaryrefslogtreecommitdiff
path: root/ttt.jai
diff options
context:
space:
mode:
Diffstat (limited to 'ttt.jai')
-rw-r--r--ttt.jai11
1 files changed, 6 insertions, 5 deletions
diff --git a/ttt.jai b/ttt.jai
index 364d161..414ab8c 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -1164,6 +1164,11 @@ read_input_string :: (x: int, y: int, input_limit: int, padding: int = 0) -> val
}
write_string(TUI.Commands.TextMode);
TUI.set_cursor_position(x, y);
+
+ style_input := context.tui_style;
+ style_input.underline = true;
+ TUI.using_style(style_input);
+
value, key := TUI.read_input_line(input_limit);
return value, key == TUI.Keys.Enter;
@@ -1185,11 +1190,7 @@ read_input_int :: (y: int, message: string) -> value: int, success: bool {
write_strings(" ", message, " ");
input_pos_x := x + message.count + 2;
- input_width := size_x - input_pos_x - 1;
-
- style_input := context.tui_style;
- style_input.underline = true;
- TUI.using_style(style_input);
+ input_width := size_x - input_pos_x;
str := read_input_string(input_pos_x, y, input_width);