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
13
const
char
*
getMenuItemLabelText
(
char
* buffer,
int
buflen,
const
menuItem_t
* item);
14
bool
menuItemIsSetting
(
const
menuItem_t
* item);
15
bool
menuItemHasOptions
(
const
menuItem_t
* item);
16
bool
menuItemHasPrev
(
const
menuItem_t
* item);
17
bool
menuItemHasNext
(
const
menuItem_t
* item);
18
bool
menuItemIsBack
(
const
menuItem_t
* item);
19
bool
menuItemHasSubMenu
(
const
menuItem_t
* item);
20
void
menuSavePosition
(
const
char
** out,
int
len,
const
menu_t
* menu);
21
menu_t
*
menuRestorePosition
(
const
char
** in,
int
len,
menu_t
* menu);
22
23
#endif
menu.h
_menu_t
The underlying data for a menu. This fundamentally is a list of menuItem_t.
Definition
menu.h:173
menuItem_t
The underlying data for an item in a menu. The item may be a single-select, multi-select,...
Definition
menu.h:157
menuSavePosition
void menuSavePosition(const char **out, int len, const menu_t *menu)
Stores the current menu position in a buffer.
Definition
menu_utils.c:159
getMenuItemLabelText
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
menuItemIsSetting
bool menuItemIsSetting(const menuItem_t *item)
Returns whether a menu item is a settings item.
Definition
menu_utils.c:80
menuRestorePosition
menu_t * menuRestorePosition(const char **in, int len, menu_t *menu)
Restores the menu position from the given buffer.
Definition
menu_utils.c:203
menuItemIsBack
bool menuItemIsBack(const menuItem_t *item)
Returns true if this item is the "Back" button on a sub-menu.
Definition
menu_utils.c:133
menuItemHasPrev
bool menuItemHasPrev(const menuItem_t *item)
Returns true if this item has any previous option.
Definition
menu_utils.c:107
menuItemHasNext
bool menuItemHasNext(const menuItem_t *item)
Returns true if this item has any next option.
Definition
menu_utils.c:120
menuItemHasOptions
bool menuItemHasOptions(const menuItem_t *item)
Returns whether this menu item has options.
Definition
menu_utils.c:95
menuItemHasSubMenu
bool menuItemHasSubMenu(const menuItem_t *item)
Returns true if this item will enter a sub-menu when selected.
Definition
menu_utils.c:145
main
menu
menu_utils.h
Generated by
1.10.0