diff options
| author | nathan <nathansmith@disroot.org> | 2025-12-22 02:43:07 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2025-12-22 02:43:07 +0000 |
| commit | dabcd8342e77d4bfac4f7bc5cee8643121d379f7 (patch) | |
| tree | 1579174ab37568d269aacef5788a1baf042ac9d0 /src/entities | |
| parent | 2254600c6dfb50333327ddb94457427596b51807 (diff) | |
| download | FindThings-dabcd8342e77d4bfac4f7bc5cee8643121d379f7.tar.gz FindThings-dabcd8342e77d4bfac4f7bc5cee8643121d379f7.tar.bz2 FindThings-dabcd8342e77d4bfac4f7bc5cee8643121d379f7.zip | |
Interaction menu going well
Diffstat (limited to 'src/entities')
| -rw-r--r-- | src/entities/ron.c | 28 | ||||
| -rw-r--r-- | src/entities/ron.h | 2 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/entities/ron.c b/src/entities/ron.c index bd32e6a..834c119 100644 --- a/src/entities/ron.c +++ b/src/entities/ron.c @@ -1,4 +1,5 @@ #include "ron.h" +#include "ui.h" void initRon(Entity* entity) { @@ -14,3 +15,30 @@ void updateRon(Entity* entity, Game* game) { DrawModel(game->assets.models[RON_MODEL], entity->position, 1.0, WHITE); } + +InteractionCommand interactWithRon(Entity* entity, Game* game, + Selection selection) +{ + InteractionMenu* menu = &game->interactionMenu; + + const InteractionItems items = { + "test 1", + "test 2", + "test 3", + "test 4", + "test 5", + "test 6", + "test 7", + "test 8", + "test 9" + }; + + switch (selection) + { + case SELECTION_INTERACT: + setInteractionMenu(menu, items, 9); + return INTERACTION_SHOW_MENU; + default: + return INTERACTION_END; + } +} diff --git a/src/entities/ron.h b/src/entities/ron.h index 10858c1..ed0dbd2 100644 --- a/src/entities/ron.h +++ b/src/entities/ron.h @@ -7,6 +7,8 @@ void initRon(Entity* entity); void updateRon(Entity* entity, Game* game); +InteractionCommand interactWithRon(Entity* entity, Game* game, + Selection selection); #endif |
