Jazz2::UI::Windows::MenuBar class

Menu bar at the top of the window.

Base classes

class Panel
A stack with a background.

Constructors, destructors, conversion operators

MenuBar()

Public functions

auto AddMenu(StringView label, Function<void(SmallVectorImpl<MenuEntry>&)>&& builder) -> MenuBarItem*
Adds a menu.
auto OpenByMnemonic(char letter) -> bool
Opens the menu whose underlined letter is a letter, as Alt with it does, returns false if there's none.
void Draw(Painter& painter) override
Draws the element and its children.
void Update(float timeMult) override
Advances animations of the element and its children.

Function documentation

bool Jazz2::UI::Windows::MenuBar::OpenByMnemonic(char letter)

Opens the menu whose underlined letter is a letter, as Alt with it does, returns false if there's none.

Each menu has the first letter of its label underlined that no menu before it has.