aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.h
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2025-12-22 02:43:07 +0000
committernathan <nathansmith@disroot.org>2025-12-22 02:43:07 +0000
commitdabcd8342e77d4bfac4f7bc5cee8643121d379f7 (patch)
tree1579174ab37568d269aacef5788a1baf042ac9d0 /src/ui.h
parent2254600c6dfb50333327ddb94457427596b51807 (diff)
downloadFindThings-dabcd8342e77d4bfac4f7bc5cee8643121d379f7.tar.gz
FindThings-dabcd8342e77d4bfac4f7bc5cee8643121d379f7.tar.bz2
FindThings-dabcd8342e77d4bfac4f7bc5cee8643121d379f7.zip
Interaction menu going well
Diffstat (limited to 'src/ui.h')
-rw-r--r--src/ui.h10
1 files changed, 8 insertions, 2 deletions
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);