aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.h
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2026-01-07 03:57:09 +0000
committernathan <nathansmith@disroot.org>2026-01-07 03:57:09 +0000
commitfd070849940355741b69fe5fbdf75a01dcc8f424 (patch)
tree068b2d87e5db33fe9978a8a1fd5c3fef8697bd55 /src/ui.h
parent382cb08822808f57902f67a842259e64afb33e72 (diff)
downloadFindThings-fd070849940355741b69fe5fbdf75a01dcc8f424.tar.gz
FindThings-fd070849940355741b69fe5fbdf75a01dcc8f424.tar.bz2
FindThings-fd070849940355741b69fe5fbdf75a01dcc8f424.zip
Cool text animation thingy
Diffstat (limited to 'src/ui.h')
-rw-r--r--src/ui.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui.h b/src/ui.h
index 2c66eca..9d3f999 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -11,6 +11,10 @@ typedef char InteractionItems[INTERACTION_MENU_MAX][INTERACTION_LABEL_MAX];
typedef struct {
char text[INTERACTION_CHAT_MAX];
+ char displayedText[INTERACTION_CHAT_MAX];
+ size_t textSize;
+ int displayUpTo; // Used for cool animation.
+ double lastCharacterUpdate;
Rectangle rect;
bool visible;
EntityId entityId;
@@ -31,6 +35,8 @@ void hideInteractionChat(InteractionChat* chat);
void setInteractionChat(InteractionChat* chat, const char* text);
void writeToInteractionChat(InteractionChat* chat, const char* text);
void clearInteractionChat(InteractionChat* chat);
+bool isInteractionChatAnimationDone(InteractionChat* chat);
+void endInteractionChatAnimation(InteractionChat* chat);
void updateInteractionChat(InteractionChat* chat, Game* game);
// Interaction menu procedures.