EditorGUI.IntPopup Manual     Reference     Scripting  
Scripting > Editor Classes > EditorGUI
EditorGUI.IntPopup

static function IntPopup (position : Rect, selectedValue : int, displayedOptions : string[], optionValues : int[], style : GUIStyle = EditorStyles.popup) : int

static function IntPopup (position : Rect, selectedValue : int, displayedOptions : GUIContent[], optionValues : int[], style : GUIStyle = EditorStyles.popup) : int

static function IntPopup (position : Rect, label : string, selectedValue : int, displayedOptions : string[], optionValues : int[], style : GUIStyle = EditorStyles.popup) : int

static function IntPopup (position : Rect, label : GUIContent, selectedValue : int, displayedOptions : GUIContent[], optionValues : int[], style : GUIStyle = EditorStyles.popup) : int

Parameters

NameDescription
position Rectangle on the screen to use for the field.
label Optional label in front of the field.
selectedValue The value of the option the field shows.
displayedOptions An array with the displayed options the user can choose from.
optionValues An array with the values for each option.
style Optional GUIStyle.

Returns

int - The value of the option that has been selected by the user.

Description

Make an integer popup selection field.

Takes the currently selected integer as a parameter and returns the integer selected by the user.