/**
 * Copyright (c) 2021 Dominic Masters
 * 
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

#pragma once
#include <dawn/dawn.h>
#include "../../display/gui/font.h"
#include "../../display/primitive.h"
#include "../../display/shader.h"
#include "../../input/input.h"

/**
 * Initializes the talk manager.
 * @param poker The poker game context.
 */
void pokerTalkInit(poker_t *poker);

/**
 * Disposes and cleans the talk manager context.
 * @param poker Poker instance.
 */
void pokerTalkDispose(poker_t *poker);

/**
 * Internal method. Checks for changes and rebuffers the talk text information
 * when scene changes occur.
 * @param poker Poker game context to buffer for.
 */
void pokerTalkTextRebuffer(poker_t *poker);

/**
 * Tick render method for the poker talk manager.
 * @param poker Poker manager context.
 * @param input Input manager to listen to.
 */
void pokerTalkRender(poker_t *poker, input_t *input);

/**
 * Requests the talk manager to begin speaking some text.
 * @param poker Poker game context
 * @param text Text to speak. Please ensure this is kept alive during talk.
 */
void pokerTalk(poker_t *poker, char *text);

/**
 * Returns true if the poker text manager is still running the talk.
 * @param poker Poker manager.
 * @returns True while the game is still running active text.
 */
bool pokerTalkIsTalking(poker_t *poker);