Basic UI with commands
This commit is contained in:
19
ui/commands.h
Normal file
19
ui/commands.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef UI_COMMANDS_H_
|
||||
#define UI_COMMANDS_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "model.h"
|
||||
|
||||
typedef struct ui_command {
|
||||
const char *command;
|
||||
const char *help_text;
|
||||
bool (*handler)(ui_state *);
|
||||
} ui_command;
|
||||
|
||||
#define UI_NUM_COMMANDS 3
|
||||
extern ui_command ui_commands[];
|
||||
|
||||
bool handle_command(ui_state *state);
|
||||
|
||||
#endif // UI_COMMANDS_H_
|
||||
Reference in New Issue
Block a user