diff options
| author | nathan <nathansmith@disroot.org> | 2025-12-21 23:22:13 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2025-12-21 23:22:13 +0000 |
| commit | 260d51b8399935c067eb79720db63e08d1c3f1f2 (patch) | |
| tree | f4f8f28a942f8b2d9e3d796c5d75786301219d0f /src/ui.c | |
| parent | e4acecf8cebacbcbb6b7739aff7f34fd0147ed45 (diff) | |
| download | FindThings-260d51b8399935c067eb79720db63e08d1c3f1f2.tar.gz FindThings-260d51b8399935c067eb79720db63e08d1c3f1f2.tar.bz2 FindThings-260d51b8399935c067eb79720db63e08d1c3f1f2.zip | |
Working on interaction menu thingy
Diffstat (limited to 'src/ui.c')
| -rw-r--r-- | src/ui.c | 53 |
1 files changed, 49 insertions, 4 deletions
@@ -63,12 +63,12 @@ void updateInteractionChat(InteractionChat* chat, Game* game) } Color background = DARKGRAY; - background.a = game->settings.interactionChatAlpha; + background.a = game->settings.interactionAlpha; DrawRectangleRec(chat->rect, background); - float lineThickness = 2.0; - float border = 3.0; - int fontSize = game->settings.interactionChatFontSize; + float lineThickness = game->settings.interactionOutlineSize; + float border = lineThickness + 1.0; + int fontSize = game->settings.interactionFontSize; DrawRectangleLinesEx(chat->rect, lineThickness, BLACK); @@ -93,3 +93,48 @@ void updateInteractionChat(InteractionChat* chat, Game* game) fontSize, WHITE); } + +void resizeInteractionMenu(InteractionMenu* menu, const Settings* settings) +{ +} + +void initInteractionMenu(InteractionMenu* menu, const Settings* settings) +{ + resetInteractionMenu(menu); + menu->rect = (Rectangle){100.0, 100.0, 200.0, 200.0}; + menu->visible = false; + menu->entityId = ENTITY_NONE; +} + +void resetInteractionMenu(InteractionMenu* menu) +{ + for (int index = 0; index < INTERACTION_MENU_MAX; ++index) + { + memset(menu->items[index], 0, INTERACTION_LABEL_MAX * sizeof(char)); + } +} + +void showInteractionMenu(InteractionMenu* menu) +{ + menu->visible = true; +} + +void hideInteractionMenu(InteractionMenu* menu) +{ + menu->visible = false; +} + +void updateInteractionMenu(InteractionMenu* menu, Game* game) +{ + if (IsWindowResized()) + { + resizeInteractionMenu(menu, &game->settings); + } + + if (!menu->visible) + { + return; + } + + +} |
