/** * Copyright (c) 2025 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "dusk.h" #define RPG_TEXTBOX_MAX_CHARS 256 typedef enum { RPG_TEXTBOX_POS_TOP, RPG_TEXTBOX_POS_BOTTOM, } rpgtextboxpos_t; typedef struct { rpgtextboxpos_t position; bool_t visible; char_t text[RPG_TEXTBOX_MAX_CHARS]; } rpgtextbox_t; extern rpgtextbox_t RPG_TEXTBOX; /** * Initializes the RPG textbox. */ void rpgTextboxInit(); /** * Shows the RPG textbox at a specified position. * * @param position The position to show the textbox at. * @param text The text to display in the textbox (copied). */ void rpgTextboxShow( const rpgtextboxpos_t position, const char_t *text ); /** * Hides the RPG textbox. */ void rpgTextboxHide(); /** * Checks if the RPG textbox is currently visible. * * @return true if the textbox is visible, false otherwise. */ bool_t rpgTextboxIsVisible();