diff options
| author | dam <dam@gudinoff> | 2024-04-07 04:35:43 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2024-04-07 04:35:43 +0100 |
| commit | a3cf506defb4a01759db6f920a363e23de63e984 (patch) | |
| tree | 0b47b00c1cf983460436f3667df31c02646f0b8b /ttt.jai | |
| parent | 6aed607156f476937bc18a80540e2cb2e8c212ec (diff) | |
| download | task-time-tracker-a3cf506defb4a01759db6f920a363e23de63e984.tar.zst task-time-tracker-a3cf506defb4a01759db6f920a363e23de63e984.zip | |
Fixed input width.
Diffstat (limited to 'ttt.jai')
| -rw-r--r-- | ttt.jai | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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); |
