Click or drag to resize

PopupMenuAddMultistateItem Method

Adds a new multistate item with text label.

Contrarily to normal binary items, multistate items can have more than two states, as defined by max_states. Each press or activate of the item will increase the state by one. The default value is defined by default_state.

An id can optionally be provided, as well as an accelerator (accel). If no id is provided, one will be created from the index. If no accel is provided then the default 0 will be assigned to it. See GetItemAccelerator(Int32) for more info on accelerators.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void AddMultistateItem(
	string label,
	int maxStates,
	int defaultState = 0,
	int id = -1,
	uint accel = 0
)

Parameters

label
Type: SystemString

[Missing <param name="label"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]

maxStates
Type: SystemInt32

[Missing <param name="maxStates"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]

defaultState (Optional)
Type: SystemInt32

[Missing <param name="defaultState"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]

id (Optional)
Type: SystemInt32

[Missing <param name="id"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]

accel (Optional)
Type: SystemUInt32

[Missing <param name="accel"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]

See Also