This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

WidgetMenuBar Class

This class creates a horizontal menu bar.

WidgetMenuBar Class

This class inherits from Widget

Members


WidgetMenuBar (Gui gui)

Constructor. Creates an empty menu bar.

Arguments

  • Gui gui - GUI, to which the menu bar will belong.

int addItem (string title, WidgetMenuBox menu)

Adds a menu with a given title.

Arguments

  • string title - Menu title.
  • WidgetMenuBox menu - Menu.

Return value

Number of the added menu.

void clear ()

Removes all menus from the menu bar.

WidgetMenuBox getItemMenu (int item)

Returns the menu of a given item.

Arguments

  • int item - Item number in range from 0 to the total number of menu bar items.

Return value

Menu.

string getItemText (int item)

Returns the title of a given item.

Arguments

  • int item - Item number.

Return value

Item title.

int getNumItems ()

Returns the number of items in the menu bar.

Return value

Number of items.

void removeItem (int item)

Removes a given item from the menu bar.

Arguments

  • int item - Item number in range from 0 to the total number of menu bar items.

void setItemMenu (int item, WidgetMenuBox menu)

Sets a menu for a given item.

Arguments

  • int item - Item number in range from 0 to the total number of menu bar items.
  • WidgetMenuBox menu - Menu.

void setItemText (int item, string title)

Sets a title for a given item.

Arguments

  • int item - Item number in range from 0 to the total number of menu bar items.
  • string title - Menu title.
Last update: 2017-07-03
Build: ()