Game Development Reference
In-Depth Information
(uint)Native.MaskFlags.State |
(uint)Native.MaskFlags.SubMenu |
menuItemInfo.Type = (uint)Native.MenuFlags.String;
menuItemInfo.State = (uint)Native.MenuFlags.Enabled;
Native.InsertMenuItem(menu, (uint)menuId, 1, ref menuItemInfo);
AddMenuSeparator(menu, menuId + 1);
catch (Exception exception)
return id;
The base class exposes a method that is used to register commands with the under-
lying framework and create the submenu items for the context menu. The follow-
ing code shows this method. Specifying - (a hyphen) as the command text will
insert a separator entry, which is useful for cleaning up menus with multiple groups
of commands.
protected void RegisterCommand(string command)
if (command == “-”)
AddMenuSeparator(_popupMenu, (uint)(_commandPosition));
_commands.Add(_commandPosition, command);
Search Nedrilad ::

Custom Search