User:Unsane/LuaParamsExample

From Miranda NG
Revision as of 20:44, 15 April 2018 by Unsane (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ModifyMenuItem

Modifies menu item.

Parameters
hMenuItem
Type: light userdata
Menu item handle.
name
Type: string
New menu item name or nil.
icon
Type: light userdata
Icon handle or INVALID_HANDLE_VALUE
flags
Type: number
Additional flags or -1
Result
Type: light userdata
If success, returns menu item handle, otherwise nil.
Example
local hMenuItem = genmenu.CreateRoot(genmenu.MO_MAIN)


ModifyMenuItemWithTable

Modifies menu item.

Parameters

Name Type Description
hMenuItem(required) light userdata Menu item handle
name string New menu item name or nil
icon light userdata Icon handle or INVALID_HANDLE_VALUE
flags number Additional flags or -1

Result

Type: light userdata
If success, returns menu item handle, otherwise nil

Example

local hMenuItem = genmenu.CreateRoot(genmenu.MO_MAIN)