From fd070849940355741b69fe5fbdf75a01dcc8f424 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 6 Jan 2026 20:57:09 -0700 Subject: Cool text animation thingy --- src/ui.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ui.h') 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. -- cgit v1.2.3