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
public void AddMultistateItem( string label, int maxStates, int defaultState = 0, int id = -1, uint accel = 0 )
[Missing <param name="label"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]
[Missing <param name="maxStates"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]
[Missing <param name="defaultState"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]
[Missing <param name="id"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]
[Missing <param name="accel"/> documentation for "M:Godot.PopupMenu.AddMultistateItem(System.String,System.Int32,System.Int32,System.Int32,System.UInt32)"]