From f339de8c07647ed4c5d659639f0f3e6c271faf8f Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 19 Jan 2026 06:35:16 -0700 Subject: Improved viability for inventory item blinking --- src/entities/oldMint.c | 1 + src/entities/stickyNickel.c | 1 + src/settings.c | 2 +- src/ui.c | 2 +- src/ui.h | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/entities/oldMint.c b/src/entities/oldMint.c index 1c95902..445f34a 100644 --- a/src/entities/oldMint.c +++ b/src/entities/oldMint.c @@ -18,6 +18,7 @@ InteractionCommand interactWithOldMint(Entity* entity, Game* game, .id = OLD_MINT, .parent = entity, .textureId = MINT_TEXTURE, + .blinkColor = BLUE, .count = 1 }; diff --git a/src/entities/stickyNickel.c b/src/entities/stickyNickel.c index 00b7da1..3738089 100644 --- a/src/entities/stickyNickel.c +++ b/src/entities/stickyNickel.c @@ -20,6 +20,7 @@ InteractionCommand interactWithStickyNickel(Entity* entity, Game* game, .id = STICKY_NICKEL, .parent = entity, .textureId = NICKEL_TEXTURE, + .blinkColor = RED, .count = 1 }; diff --git a/src/settings.c b/src/settings.c index e4ddd5a..2875ca6 100644 --- a/src/settings.c +++ b/src/settings.c @@ -44,7 +44,7 @@ Settings defaultSettings() .interactionChatHeight = 300.0, .interactionMenuWidth = 500.0, .interactionChatAnimationSpeed = 0.03, - .inventoryItemBlinkSpeed = 0.5, + .inventoryItemBlinkSpeed = 0.35, .mouseSpeed = 0.1, .forwardKey = KEY_W, .backwardKey = KEY_S, diff --git a/src/ui.c b/src/ui.c index d45979b..e071036 100644 --- a/src/ui.c +++ b/src/ui.c @@ -357,7 +357,7 @@ void updateInventory(Inventory* inventory, Game* game) if (mouseIsSelecting && row == mouseRow && column == mouseColumn && (int)(GetTime() / game->settings.inventoryItemBlinkSpeed) % 2 == 0) { - color = RED; + color = item->blinkColor; } DrawTextureEx(game->assets.textures[item->textureId], (Vector2){x, y}, 0.0, diff --git a/src/ui.h b/src/ui.h index 33d09b7..f8e9ae6 100644 --- a/src/ui.h +++ b/src/ui.h @@ -38,6 +38,7 @@ typedef struct { EntityId id; Entity* parent; AssetId textureId; + Color blinkColor; int count; } InventoryItem; -- cgit v1.2.3