Files
dusk/archive/rpg/rpgtextbox.h
Dominic Masters af5bf987c8
All checks were successful
Build Dusk / run-tests (push) Successful in 2m12s
Build Dusk / build-linux (push) Successful in 1m49s
Build Dusk / build-psp (push) Successful in 1m52s
Add inventory.
2026-01-06 07:47:16 -06:00

52 lines
977 B
C

/**
* 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();