/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include #include "../gui/vntextbox.h" #include "../../util/array.h" #include "../../display/animation/timeline.h" #include "../../display/animation/queue.h" /** * Initialize the conversation set. After adding your first conversation element * then ensure you call vnConversationNext to begin the conversation. * @param convo Conversation to initialize. * @param font Font to initialize with. * @param tex GUI Texture. */ void vnConversationInit(vnconversation_t *convo, font_t *font, texture_t *text); /** * Add a text element to the conversation. * @param convo Conversation to add to. * @return The pointer to the queue element. */ queueaction_t * vnConversationAdd(vnconversation_t *convo); /** * Updates the conversation logic and the wrapped textbox. * @param convo Conversation to update. * @param engine Engine used to update. */ void vnConversationUpdate(vnconversation_t *convo, engine_t *engine); /** * Renders the conversation, mostly just a wrapper for the textbox. * @param convo Conversation to render. * @param shader Shader to use while rendering. */ void vnConversationRender(vnconversation_t *convo, shader_t *shader); /** * Dispose the conversation when finished. * @param convo Conversation to dispose. */ void vnConversationDispose(vnconversation_t *convo);