Table of Contents

Menu Item GUI Class

Github Link

 namespace lc::ui::api 


Description

Constructs a menu item gui object. Menu item after being constructed needs to be added to a menu for it to be visible in the application.

Examples


Add Callback


Description

Add lua function callback to be called when the menu item is clicked. Multiple callbacks can be added. Callbacks can also be named callbacks i.e. associated with a name so that it can be later removed by use of the name.

Examples


Remove Callback


Description

Remove lua function called associated with the given name. Only named callbacks can be removed.

Examples


Label


Description

Get and set label for the menu item.

Examples


Hide and Show


Description

Hide or show the menu item.

Examples


Position


Description

Get the current menu item position or set the menu item position. Other items are rearranged accordingly.

Examples


Remove


Description

Remove the current menu item from the parent menu.

Examples