Go to the source code of this file.
Data Structures | |
| struct | MenuItem |
| struct | MenuGroup |
| struct | Menu |
Functions | |
| Menu * | Menu_New (void) |
| Creates a new Menu object, allocating space from the heap return Returns a complete Menu object with bitmap allocation, and all properties set to default. More... | |
| void | Menu_Destroy (Menu **the_menu) |
| void | Menu_Render (Menu *the_menu) |
| Renders the menu and blits entire menu or required cliprects to the screen. More... | |
| void | Menu_Open (Menu *the_menu, MenuGroup *the_menu_group, int16_t x, int16_t y) |
| Replaces current menu_group_ reference with a new one, calculates widths, rects, and renders the menu at an appropriate place based on x, y passed and size of menu NOTE: this sets mouse mode to mouseMenuOpen. More... | |
| void | Menu_CancelOpen (Menu *the_menu) |
| Cancels the opening of a menu before it is shown NOTE: this sets mouse mode back to mouseFree. More... | |
| void | Menu_Hide (Menu *the_menu) |
| Hides the menu by damaging and distributing damage rects to all other windows, and re-rendering screen. More... | |
| void | Menu_SetVisible (Menu *the_menu, bool is_visible) |
| Set the menu's visibility flag. More... | |
| int16_t | Menu_AcceptClick (Menu *the_menu, int16_t x, int16_t y) |
| Accept a right or left mouse click while a menu is open, identify which, if any, menu item should be selected as a result. More... | |
| void | Menu_AcceptMouseMove (Menu *the_menu, int16_t x, int16_t y) |
| Accept a new mouse x/y while a menu is open, identify which, if any, menu item should be shown as selected. More... | |
| bool | Menu_SetFont (Menu *the_menu, Font *the_font) |
| Set the font used for drawing menu text This also sets the font of the menu's bitmap. More... | |
| int16_t Menu_AcceptClick | ( | Menu * | the_menu, |
| int16_t | x, | ||
| int16_t | y | ||
| ) |
Accept a right or left mouse click while a menu is open, identify which, if any, menu item should be selected as a result.
| the_menu | – reference to a valid Menu object. |
| x | – Global horizontal coordinate when the mouse was clicked |
| y | – Global vertical coordinate when the mouse was clicked |
| void Menu_AcceptMouseMove | ( | Menu * | the_menu, |
| int16_t | x, | ||
| int16_t | y | ||
| ) |
Accept a new mouse x/y while a menu is open, identify which, if any, menu item should be shown as selected.
| the_menu | – reference to a valid Menu object. |
| x | – Global horizontal coordinate of current mouse loc |
| y | – Global vertical coordinate of current mouse loc |
| void Menu_CancelOpen | ( | Menu * | the_menu | ) |
Cancels the opening of a menu before it is shown NOTE: this sets mouse mode back to mouseFree.
| the_menu | – reference to a valid Menu object. |
| void Menu_Destroy | ( | Menu ** | the_menu | ) |
| the_menu | – pointer to the pointer for the Menu object to be destroyed |
| void Menu_Hide | ( | Menu * | the_menu | ) |
Hides the menu by damaging and distributing damage rects to all other windows, and re-rendering screen.
| the_menu | – reference to a valid Menu object. |
| Menu * Menu_New | ( | void | ) |
Replaces current menu_group_ reference with a new one, calculates widths, rects, and renders the menu at an appropriate place based on x, y passed and size of menu NOTE: this sets mouse mode to mouseMenuOpen.
| void Menu_Render | ( | Menu * | the_menu | ) |
Renders the menu and blits entire menu or required cliprects to the screen.
| the_menu | – reference to a valid Menu object. |
| void Menu_SetVisible | ( | Menu * | the_menu, |
| bool | is_visible | ||
| ) |
Set the menu's visibility flag.
This does not immediately cause the menu to render. The menu will be rendered on the next rendering pass.
| the_menu | – reference to a valid Menu object. |
| is_visible | – if true, the menu will no longer be rendered on subsequent render passes. If false, the menu will be rendered on the next rendering pass. |