From dabcd8342e77d4bfac4f7bc5cee8643121d379f7 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 21 Dec 2025 19:43:07 -0700 Subject: Interaction menu going well --- src/ui.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ui.h') diff --git a/src/ui.h b/src/ui.h index 0b3c858..2c66eca 100644 --- a/src/ui.h +++ b/src/ui.h @@ -5,7 +5,9 @@ #ifndef UI_H #define UI_H -#define INTERACTION_CHAT_COLUMN_MAX 80 +#define INTERACTION_COLUMN_MAX 80 + +typedef char InteractionItems[INTERACTION_MENU_MAX][INTERACTION_LABEL_MAX]; typedef struct { char text[INTERACTION_CHAT_MAX]; @@ -15,7 +17,8 @@ typedef struct { } InteractionChat; typedef struct { - char items[INTERACTION_MENU_MAX][INTERACTION_LABEL_MAX]; + InteractionItems items; + int itemCount; Rectangle rect; bool visible; EntityId entityId; @@ -32,6 +35,9 @@ void updateInteractionChat(InteractionChat* chat, Game* game); // Interaction menu procedures. void initInteractionMenu(InteractionMenu* menu, const Settings* settings); +void setInteractionMenu(InteractionMenu* menu, + const InteractionItems items, + int itemCount); void resetInteractionMenu(InteractionMenu* menu); void showInteractionMenu(InteractionMenu* menu); void hideInteractionMenu(InteractionMenu* menu); -- cgit v1.2.3