From 2254600c6dfb50333327ddb94457427596b51807 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 21 Dec 2025 18:17:44 -0700 Subject: Interaction menu stuff and fps adhd --- src/ui.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index e985dad..707bb06 100644 --- a/src/ui.c +++ b/src/ui.c @@ -96,12 +96,18 @@ void updateInteractionChat(InteractionChat* chat, Game* game) void resizeInteractionMenu(InteractionMenu* menu, const Settings* settings) { + menu->rect = (Rectangle){ + 0.0, + 0.0, + GetRenderWidth() - settings->mapPreviewWidth, + GetRenderHeight() - settings->interactionChatHeight + }; } void initInteractionMenu(InteractionMenu* menu, const Settings* settings) { resetInteractionMenu(menu); - menu->rect = (Rectangle){100.0, 100.0, 200.0, 200.0}; + resizeInteractionMenu(menu, settings); menu->visible = false; menu->entityId = ENTITY_NONE; } @@ -131,10 +137,18 @@ void updateInteractionMenu(InteractionMenu* menu, Game* game) resizeInteractionMenu(menu, &game->settings); } - if (!menu->visible) - { - return; - } + /* if (!menu->visible) */ + /* { */ + /* return; */ + /* } */ - + Color background = DARKGRAY; + background.a = game->settings.interactionAlpha; + DrawRectangleRec(menu->rect, background); + + float lineThickness = game->settings.interactionOutlineSize; + float border = lineThickness + 1.0; + int fontSize = game->settings.interactionFontSize; + + DrawRectangleLinesEx(menu->rect, lineThickness, BLACK); } -- cgit v1.2.3