normal mode, command mode

This commit is contained in:
Luka Jankovic 2025-07-02 01:16:19 +02:00
parent d41e801aeb
commit ecc8a1df95
10 changed files with 133 additions and 14 deletions

View file

@ -24,11 +24,14 @@ void kubo_context_init(struct kubo_context *context) {
}
kubo_wall_arr_init(&context->walls);
kubo_char_arr_init(&context->command);
context->wall_select_index = 0;
context->exit_pending = false;
}
void kubo_context_cleanup(struct kubo_context *context) {
kubo_wall_arr_free(&context->walls);
kubo_char_arr_free(&context->command);
}
void kubo_context_set_state(struct kubo_context *context,
@ -36,6 +39,10 @@ void kubo_context_set_state(struct kubo_context *context,
context->state = state;
switch (context->state) {
case KUBO_CONTEXT_COMMAND:
kubo_char_arr_add(&context->command, ':');
break;
case KUBO_CONTEXT_WALL_NEW:
break;