klyn.gui.windows.MenuItem.MenuItem
constructor
public MenuItem(
text as String = "",
icon as String = "",
shortcut as String = "",
subMenu as Menu = null,
isCheckable as Boolean = false,
isChecked as Boolean = false
):
Description

Creates a menu item.

Parameters
ParameterDescription
textDisplay text, optionally containing an & mnemonic.
iconSVG or raster icon filename.
shortcutHuman-readable keyboard shortcut.
subMenuChild menu opened from this entry.
isCheckableWhether activation toggles a check indicator.
isCheckedInitial checked state.
Example
autoSave = MenuItem(
"&Auto Save",
shortcut="Ctrl+Alt+S",
isCheckable=true,
isChecked=true
)