DungeonCrawl
|
Implements outputting to the screen for the inventory mode. More...
#include "inventory_output.h"
#include "../../../character/character.h"
#include "../../../common.h"
#include "../../../logging/logger.h"
#include "../../input/input_handler.h"
#include "../../io_handler.h"
#include "../common/output_handler.h"
Go to the source code of this file.
Functions | |
vector2d_t | draw_inventory_view (const vector2d_t anchor, const character_t *player) |
Draws the inventory view UI. | |
void | draw_inventory_menu (const vector2d_t anchor, const char *menu_name, const char *header_msg, char **menu_options, const int menu_option_count, const int selected_index, const char *key_msg, const char *tail_msg) |
Draws the inventory menu. | |
void | draw_inventory_log (vector2d_t anchor, const char *inventory_log_message) |
Draws the inventory log. | |
int | draw_inventory_resource_bar (vector2d_t anchor, const character_t *c) |
Draws the resource bar for a character in the inventory view. |
Implements outputting to the screen for the inventory mode.
Definition in file inventory_output.c.
void draw_inventory_log | ( | vector2d_t | anchor, |
const char * | inventory_log_message ) |
Draws the inventory log.
This function displays an inventory log message and waits for user input.
anchor | The anchor point of the inventory log, representing the top-left corner |
inventory_log_message | The message to be displayed in the inventory log |
Definition at line 84 of file inventory_output.c.
void draw_inventory_menu | ( | vector2d_t | anchor, |
const char * | menu_name, | ||
const char * | header_msg, | ||
char ** | menu_options, | ||
int | menu_option_count, | ||
int | selected_index, | ||
const char * | key_msg, | ||
const char * | tail_msg ) |
Draws the inventory menu.
This function renders a menu for the inventory mode with selectable options.
anchor | The anchor point of the inventory menu, representing the top left corner |
menu_name | The name of the menu |
header_msg | The message to display at the top of the menu (can be NULL) |
menu_options | The options of the menu |
menu_option_count | The number of options in the menu |
selected_index | The index of the selected option |
key_msg | First message to display at the bottom of the menu (can be NULL) |
tail_msg | Second message to display at the bottom of the menu (can be NULL) |
Definition at line 33 of file inventory_output.c.
int draw_inventory_resource_bar | ( | vector2d_t | anchor, |
const character_t * | c ) |
Draws the resource bar for a character in the inventory view.
This function displays the character's name, health, mana, and stamina.
anchor | The anchor point for the resource bar, representing the top-left corner |
c | A pointer to the character whose resources are to be displayed |
Definition at line 105 of file inventory_output.c.
vector2d_t draw_inventory_view | ( | vector2d_t | anchor, |
const character_t * | player ) |
Draws the inventory view UI.
This function renders the inventory view including player resources and inventory space.
anchor | The anchor point of the inventory view, representing the top left corner |
player | The player character |
Definition at line 15 of file inventory_output.c.