diff options
| author | dam <dam@gudinoff> | 2024-05-05 15:55:30 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2024-05-05 15:55:30 +0100 |
| commit | b32a697e1898a37497cfc504a2746dcf1f0710da (patch) | |
| tree | 323200ad27b36cb80a7697f5bedf31464e0d171b /ttt.jai | |
| parent | 3ae6ce04674daaef4f3bf69adbfe4333402cb423 (diff) | |
| download | task-time-tracker-b32a697e1898a37497cfc504a2746dcf1f0710da.tar.zst task-time-tracker-b32a697e1898a37497cfc504a2746dcf1f0710da.zip | |
Finished first version of TUI.
Diffstat (limited to 'ttt.jai')
| -rw-r--r-- | ttt.jai | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -86,6 +86,7 @@ pos_y : int; style_default := TUI.Style.{ background = TUI.Palette.BLACK, foreground = TUI.Palette.WHITE, + // use_default_background_color = true, TODO }; style_selected := TUI.Style.{ @@ -97,12 +98,14 @@ style_selected_inverted := TUI.Style.{ background = TUI.Palette.BLACK, foreground = TUI.Palette.CYAN, bold = true, + // use_default_background_color = true, TODO }; style_active := TUI.Style.{ background = TUI.Palette.BLACK, foreground = TUI.Palette.BLUE, bold = true, + // use_default_background_color = true, TODO }; style_active_selected := TUI.Style.{ @@ -115,6 +118,7 @@ style_error := TUI.Style.{ background = TUI.Palette.BLACK, foreground = TUI.Palette.RED, bold = true, + // use_default_background_color = true, TODO }; Layouts :: enum u8 { @@ -1009,6 +1013,9 @@ draw_tui :: (db: *Database, layout: *Layout) { else if (task == active_task) { TUI.set_style(style_active); } + else { + TUI.set_style(style_default); + } // Task title. x += 1; @@ -1043,10 +1050,8 @@ draw_tui :: (db: *Database, layout: *Layout) { // Task total. x += 1; print_time(y, x, total_time, layout.columns[L_TOTAL_IDX].width); - - // Reset theme. - TUI.clear_style(); } + TUI.set_style(style_default); /////////////////////////////////////////////////////////////////////////// @@ -1099,7 +1104,7 @@ free_memory :: () { free(app_directory); free(db_file_path); free(ar_file_path); - //reset_temporary_storage(); + // reset_temporary_storage(); // TODO Not needed... I guess. } read_input_string :: (x: int, y: int, input_limit: int, padding: int = 0) -> value: string, success: bool { |
