From 260d51b8399935c067eb79720db63e08d1c3f1f2 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 21 Dec 2025 16:22:13 -0700 Subject: Working on interaction menu thingy --- src/ui.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index 17a5c9f..e985dad 100644 --- a/src/ui.c +++ b/src/ui.c @@ -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; + } + + +} -- cgit v1.2.3