aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2026-01-19 13:35:16 +0000
committernathan <nathansmith@disroot.org>2026-01-19 13:35:16 +0000
commitf339de8c07647ed4c5d659639f0f3e6c271faf8f (patch)
treecd6fb7c1ff260867e862c9a0ae3ec8ccb2c2101d
parent2a3922ecd4a975c84e7c6efb3b5f0fe182b99d20 (diff)
downloadFindThings-f339de8c07647ed4c5d659639f0f3e6c271faf8f.tar.gz
FindThings-f339de8c07647ed4c5d659639f0f3e6c271faf8f.tar.bz2
FindThings-f339de8c07647ed4c5d659639f0f3e6c271faf8f.zip
Improved viability for inventory item blinking
-rw-r--r--src/entities/oldMint.c1
-rw-r--r--src/entities/stickyNickel.c1
-rw-r--r--src/settings.c2
-rw-r--r--src/ui.c2
-rw-r--r--src/ui.h1
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;