Command Group: GUI Control - Menu – Category
Jump to navigation
Jump to search
Commands to manipulate Menu / CT_MENU_STRIP, CT_MENU, CT_CONTEXT_MENU controls.
Example for Eden Editor
// Create main folder disableSerialization; private _ctrlMenuStrip = findDisplay 313 displayCtrl 120; private _indexMain = _ctrlMenuStrip menuAdd [[], "Custom Tools"]; // Create first subentry which is not checkable but has an action private _indexUncheckable = _ctrlMenuStrip menuAdd [[_indexMain],"This entry can not be checked"]; _ctrlMenuStrip menuSetAction [[_indexMain,_indexUncheckable], "systemChat 'Hello World!'"];
// Create second subentry which is checkable and has an action private _indexCheckable = _ctrlMenuStrip menuAdd [[_indexMain],"This entry is checkable"]; _ctrlMenuStrip menuSetAction [[_indexMain,_indexCheckable], "systemChat 'Hello World!'"]; _ctrlMenuStrip menuSetCheck [[_indexMain,_indexCheckable], true];
// Create third subentry which shows an image and has an action private _indexPicture = _ctrlMenuStrip menuAdd [[_indexMain],"This entry has a picture"]; _ctrlMenuStrip menuSetAction [[_indexMain,_indexPicture], "systemChat 'Hello World!'"]; _ctrlMenuStrip menuSetPicture [[_indexMain,_indexPicture],"\a3\modules_f\data\iconunlock_ca.paa"];
// Create a fourth entry which will destroy itself once clicked private _indexDelete = _ctrlMenuStrip menuAdd [[_indexMain],"This entry will be deleted once clicked"]; _ctrlMenuStrip menuSetAction [[_indexMain,_indexDelete], "findDisplay 313 displayCtrl 120 menuDelete (menuHover (findDisplay 313 displayCtrl 120)); systemChat 'Entry gone!'"];
// Create a fifth entry which will return its data once clicked private _indexData = _ctrlMenuStrip menuAdd [[_indexMain],"This entry will print its data to system chat when clicked"]; _ctrlMenuStrip menuSetData [[_indexMain,_indexData], "[objNull,'Some String',true]"]; _ctrlMenuStrip menuSetAction [[_indexMain,_indexData], "systemChat (findDisplay 313 displayCtrl 120 menuData (menuHover (findDisplay 313 displayCtrl 120)));"];
Pages in category "Command Group: GUI Control - Menu"
The following 27 pages are in this category, out of 27 total.
M
- menuAction
- menuAdd
- menuChecked
- menuClear
- menuCollapse
- menuData
- menuDelete
- menuEnable
- menuEnabled
- menuExpand
- menuHover
- menuPicture
- menuSetAction
- menuSetCheck
- menuSetData
- menuSetPicture
- menuSetShortcut
- menuSetText
- menuSetURL
- menuSetValue
- menuShortcut
- menuShortcutText
- menuSize
- menuSort
- menuText
- menuURL
- menuValue