Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
Classes | Macros | Functions

Description

Menu widget and function.

Collaboration diagram for Menu:

Classes

class  CMenu
 Menu widget. More...
 

Macros

#define MENU_DEFAULT_FONT   FontGet (fntNormal, 20)
 Default font for menus.
 
#define MENU_DEFAULT_COLOR   DARK_GREY
 Default color for menus.
 

Functions

int RunMenu (const char *_itemStr, SDL_Rect _rContainer, int _hAlign=-1, int _vAlign=-1, TColor color=MENU_DEFAULT_COLOR, TTF_Font *_font=NULL, bool *retLongPush=NULL)
 Run a menu with a single function call. More...
 

Function Documentation

◆ RunMenu()

int RunMenu ( const char *  _itemStr,
SDL_Rect  _rContainer,
int  _hAlign = -1,
int  _vAlign = -1,
TColor  color = MENU_DEFAULT_COLOR,
TTF_Font *  _font = NULL,
bool *  retLongPush = NULL 
)

Run a menu with a single function call.

Parameters
_itemStris a string containing the menu items separated by '|'.
_rContainerspecifies the rectangle in which the menu is placed.
_hAlignspecifies the horizontal alignment inside the container rectangle.
_vAlignspecifies the vertical alignment inside the container rectangle.
coloris the main menu color.
_fontis the menu font (if NULL, the default font is used).
retLongPushoptionally points to a variable which is set if the menu was completed with a long push.