Menu widget and function.
|
#define | MENU_DEFAULT_FONT FontGet (fntNormal, 20) |
| Default font for menus.
|
|
#define | MENU_DEFAULT_COLOR DARK_GREY |
| Default color for menus.
|
|
|
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...
|
|
◆ 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
-
_itemStr | is a string containing the menu items separated by '|'. |
_rContainer | specifies the rectangle in which the menu is placed. |
_hAlign | specifies the horizontal alignment inside the container rectangle. |
_vAlign | specifies the vertical alignment inside the container rectangle. |
color | is the main menu color. |
_font | is the menu font (if NULL, the default font is used). |
retLongPush | optionally points to a variable which is set if the menu was completed with a long push. |