move input, handle backspace, show cursor

This commit is contained in:
Luka Jankovic 2025-07-02 22:51:29 +02:00
parent d63cdb1c01
commit c72a215afb
4 changed files with 139 additions and 2 deletions

View file

@ -18,6 +18,12 @@
#include "kubo_command.h"
void kubo_command_render(struct kubo_context *context, int x, int y, int font_size) {
DrawText(kubo_char_arr_build_str(&context->command), x, y, font_size, WHITE);
void kubo_command_render(struct kubo_context *context, int x, int y,
int font_size) {
char *cmd = kubo_char_arr_build_str(&context->command);
DrawText(cmd, x, y, font_size, WHITE);
x += MeasureText(cmd, font_size);
x += 2;
DrawRectangle(x, y, MeasureText("x", font_size), font_size, WHITE);
}