diff options
Diffstat (limited to 'src/ui.c')
| -rw-r--r-- | src/ui.c | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -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); } |
