diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2023-06-13 21:41:35 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2023-06-13 21:41:35 -0700 |
| commit | 9e420f7b82c894e077f5c9b7d7020ac3f55ce146 (patch) | |
| tree | 421b061ac62299324621a3940dff995e7697b31a | |
| parent | c97957b76a6ff95aa413ed5cf1a39ec76aad9a60 (diff) | |
created file for console related functions. will support scrolling the output and expanding lines
| -rw-r--r-- | src/console.h | 17 | ||||
| -rw-r--r-- | src/eval.c | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/console.h b/src/console.h new file mode 100644 index 0000000..6a4d27f --- /dev/null +++ b/src/console.h @@ -0,0 +1,17 @@ +#ifndef +#define CONSOLE +#define RED "\033[0:31m" +#define GRN "\033[0:32m" +#define WHT "\033[0:37m" +struct ConsoleLine { + char* color; + char* content; + /* pointer to a function accepting a void pointer */ + void (*onInteract)(void*); +} consoleLine_t; +consoleLine_t init_consoleline(char* color, char* content); +void clear_screen(); +void draw_screen(); +void move_selection(int amount); +void interact_selected(); +#endif @@ -2,6 +2,7 @@ #include "eval.h" #include "stdio.h" #include "parse.h" +/* TODO: separate cases into functions */ char just_is_sound(line_t line, lineSet_t lines) { prop_t prop = line.proposition; just_t just = line.justification; |
