diff options
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; + } + + +} |
