diff options
| author | spl3g <spleefer6@yandex.ru> | 2025-10-10 22:19:33 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2025-10-10 22:19:33 +0300 |
| commit | 99fb0374e9352ebb61e7eea134784bd26f61a892 (patch) | |
| tree | 4d38dc45db8840cc90db2ba9333d312014db59e4 /src/ui.h | |
| parent | 5006c1f01d0c8556b74309d6678f78b63568dac3 (diff) | |
Add mouse interactions
Diffstat (limited to 'src/ui.h')
| -rw-r--r-- | src/ui.h | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -3,11 +3,32 @@ #include <stdbool.h> #include <stddef.h> +#include <stdio.h> + +#include <SDL3/SDL_scancode.h> +#include <SDL3/SDL_keycode.h> + #include "clay/clay.h" +#include "messages.h" static const Clay_Color COLOR_BG = (Clay_Color){45, 53, 59, 255}; +static const Clay_Color COLOR_BG_INTER = (Clay_Color){52, 63, 68, 255}; static const Clay_Color COLOR_FG = (Clay_Color){211, 198, 170, 255}; +static const Clay_Color COLOR_FG_INTER = (Clay_Color){227, 212, 181, 255}; + +typedef struct { + char letter; + SDL_Keycode keycode; + bool mouse_pressed; + bool keyboard_pressed; +} KeyState; + +typedef struct { + message_queue *msg_queue; + KeyState *keys; + size_t keys_amount; +} UIData; -void draw_ui(bool *pressed_keys, size_t keys_amount); +void draw_ui(UIData *ui_data); #endif // UI_H_ |
