esc and entr handling in command mode

This commit is contained in:
Luka Jankovic 2025-07-02 18:00:40 +02:00
parent 5daf8b9dd3
commit 5eb4437ac4
6 changed files with 66 additions and 14 deletions

View file

@ -23,11 +23,11 @@
#include <stdio.h>
#include <stdlib.h>
#include "kubo_char_arr.h"
#include "kubo_dynarray.h"
#include "kubo_wall.h"
KUBO_DYNARRAY_REGISTER(kubo_wall_arr, struct kubo_wall *);
KUBO_DYNARRAY_REGISTER(kubo_char_arr, char);
enum kubo_context_state {
KUBO_CONTEXT_NORMAL,
@ -36,7 +36,8 @@ enum kubo_context_state {
KUBO_CONTEXT_WALL_SELECT,
};
static const char *kubo_context_labels[] = {"Normal", "Command", "Wall New", "Wall Select"};
static const char *kubo_context_labels[] = {"Normal", "Command", "Wall New",
"Wall Select"};
static const Color kubo_context_colors[] = {BLACK, RED, GREEN, BLUE};
@ -60,6 +61,8 @@ void kubo_context_set_state(struct kubo_context *context,
const char *kubo_context_get_label(enum kubo_context_state state);
Color kubo_context_get_color(enum kubo_context_state state);
void kubo_context_accept_cmd(struct kubo_context *context);
struct kubo_wall *kubo_context_get_pending_wall(struct kubo_context *context);
void kubo_context_select_next_wall(struct kubo_context *context);