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