Click or drag to resize

PopupMenuAddIconCheckShortcut Method

Adds a new checkable item and assigns the specified ShortCut and icon texture to it. Sets the label of the checkbox to the ShortCut's name.

An id can optionally be provided. If no id is provided, one will be created from the index.

Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See SetItemChecked(Int32, Boolean) for more info on how to control it.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void AddIconCheckShortcut(
	Texture texture,
	ShortCut shortcut,
	int id = -1,
	bool global = false
)

Parameters

texture
Type: GodotTexture

[Missing <param name="texture"/> documentation for "M:Godot.PopupMenu.AddIconCheckShortcut(Godot.Texture,Godot.ShortCut,System.Int32,System.Boolean)"]

shortcut
Type: GodotShortCut

[Missing <param name="shortcut"/> documentation for "M:Godot.PopupMenu.AddIconCheckShortcut(Godot.Texture,Godot.ShortCut,System.Int32,System.Boolean)"]

id (Optional)
Type: SystemInt32

[Missing <param name="id"/> documentation for "M:Godot.PopupMenu.AddIconCheckShortcut(Godot.Texture,Godot.ShortCut,System.Int32,System.Boolean)"]

global (Optional)
Type: SystemBoolean

[Missing <param name="global"/> documentation for "M:Godot.PopupMenu.AddIconCheckShortcut(Godot.Texture,Godot.ShortCut,System.Int32,System.Boolean)"]

See Also