tui.h
| 1 | #ifndef TUI_H |
| 2 | #define TUI_H |
| 3 | |
| 4 | #include <game.h> |
| 5 | #include <stdbool.h> |
| 6 | #include <stddef.h> |
| 7 | |
| 8 | bool setup(); //setups screens, doesn't redaw contents |
| 9 | void printlog(); //clears & reprints the log window |
| 10 | void logstr(const char *format, ...); //echoes printf string to the logwindow TODO: fix multiline log |
| 11 | void charclear(); //clears the character screen |
| 12 | void charprint(const char *format, ...); //echoes printf string to the charwindow |
| 13 | void log_scroll(enum direction d); //scrolls the log up or down |
| 14 | void draw_map(const struct game *g, struct point p); //draws the map around the player |
| 15 | bool messagebox(const char *str, size_t y, size_t x); //shows a centered messagebox of at least the given size |
| 16 | |
| 17 | typedef bool(itemselectfn)(struct monster *m, size_t i); //returns true if cursor should be reset |
| 18 | void itemselect(struct monster *m, itemselectfn f); //provides an inventory screen, calls f when the space is pressed on an item |
| 19 | //TODO: create general select screen |
| 20 | |
| 21 | #endif //TUI_H |
| 22 |