C4 Engine
C4 Engine API Documentation

class Menu

Defined in:  C4Menus.h
A Menu object serves as the root widget for menus.

class Menu : public RootWidget


Menu(int32 style, const List<MenuItemWidget> *list, int32 selection = -1, float minWidth = 0.0F, float spacing = 13.0F,

const char *font = "font/Gui");

style The menu style. See below for possible values.
list The list of menu items to display in the menu.
selection The initial selection.
minWidth The minimum width at which to display the menu.
spacing The vertical distance from one menu item to the next.
font The name of the font in which menu items are displayed.
The style parameter can be one of the following constants.
kMenuPopup A popup menu associated with a PopupMenuWidget.
kMenuPulldown A pulldown menu associated with a MenuBarWidget.
kMenuContextual A contextual menu that can be displayed anywhere.
Base Classes
RootWidget Menus serve as a root widget container.