From 08c502d813b11b1f9dd7b7143a0987454c76ea32 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 22 Dec 2025 01:34:40 -0700 Subject: Menu item selection --- src/entity.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/entity.c') diff --git a/src/entity.c b/src/entity.c index ea9c66c..bcb7735 100644 --- a/src/entity.c +++ b/src/entity.c @@ -152,6 +152,16 @@ InteractionCommand interactWithEntity(Entity* entity, Game* game, return INTERACTION_END; } +int getInteractionMenuIndex(Selection selection) +{ + if (selection < SELECTION_MENU_ITEM || selection >= SELECTION_LEAVE) + { + return SELECTION_NONE; + } + + return selection - SELECTION_MENU_ITEM; +} + BoundingBox entityBoxFromScale(float scale, float width, float height) { Vector2 size = (Vector2){width / height * scale, scale}; -- cgit v1.2.3