-
Notifications
You must be signed in to change notification settings - Fork 0
/
console.h
54 lines (38 loc) · 967 Bytes
/
console.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef CONSOLE_H
#define CONSOLE_H
#include "ff_stb.h"
#include "ff_color.h"
#include "effect.h"
#define CONSOLE_HISTORY_SIZE 16
#define CONSOLE_CHAR_LIMIT 256
typedef struct Console_
{
bool open;
char history[CONSOLE_HISTORY_SIZE][CONSOLE_CHAR_LIMIT];
uint32_t font;
uint32_t size_y;
Color background_color;
Color history_text_color;
Color entry_color;
Color entry_text_color;
Effect rainbow_effect;
} Console;
extern Console console;
typedef struct ConsoleCommand_
{
char* command;
int arg_num;
void (*function) (char** tokens);
} ConsoleCommand;
void toggle_console(void * console_);
void set_console_open(bool value);
bool is_console_open();
char* get_console_history(int history_index);
void set_console_font(uint32_t font);
void init_console();
void draw_console();
void scroll_console(int lines);
void printf_console(const char * char_string, ...);
void parse_console(const char* text_input);
void enter_console(void* null);
#endif