Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
menu_utils.h
Go to the documentation of this file.
1
8#ifndef _MENU_UTILS_H_
9#define _MENU_UTILS_H_
10
11#include "menu.h"
12
13const char* getMenuItemLabelText(char* buffer, int buflen, const menuItem_t* item);
14bool menuItemIsSetting(const menuItem_t* item);
15bool menuItemHasOptions(const menuItem_t* item);
16bool menuItemHasPrev(const menuItem_t* item);
17bool menuItemHasNext(const menuItem_t* item);
18bool menuItemIsBack(const menuItem_t* item);
19bool menuItemHasSubMenu(const menuItem_t* item);
20void menuSavePosition(const char** out, int len, const menu_t* menu);
21menu_t* menuRestorePosition(const char** in, int len, menu_t* menu);
22
23#endif
The underlying data for a menu. This fundamentally is a list of menuItem_t.
Definition menu.h:173
The underlying data for an item in a menu. The item may be a single-select, multi-select,...
Definition menu.h:157
void menuSavePosition(const char **out, int len, const menu_t *menu)
Stores the current menu position in a buffer.
Definition menu_utils.c:145
const char * getMenuItemLabelText(char *buffer, int buflen, const menuItem_t *item)
Write and return the proper text label to use for the given menu item.
Definition menu_utils.c:21
bool menuItemIsSetting(const menuItem_t *item)
Returns whether a menu item is a settings item.
Definition menu_utils.c:66
menu_t * menuRestorePosition(const char **in, int len, menu_t *menu)
Restores the menu position from the given buffer.
Definition menu_utils.c:189
bool menuItemIsBack(const menuItem_t *item)
Returns true if this item is the "Back" button on a sub-menu.
Definition menu_utils.c:119
bool menuItemHasPrev(const menuItem_t *item)
Returns true if this item has any previous option.
Definition menu_utils.c:93
bool menuItemHasNext(const menuItem_t *item)
Returns true if this item has any next option.
Definition menu_utils.c:106
bool menuItemHasOptions(const menuItem_t *item)
Returns whether this menu item has options.
Definition menu_utils.c:81
bool menuItemHasSubMenu(const menuItem_t *item)
Returns true if this item will enter a sub-menu when selected.
Definition menu_utils.c:131