UnityEditor.EditorGUILayout.CycleButton C# (CSharp) Method

CycleButton() static private method

static private CycleButton ( int selected, GUIContent options, GUIStyle style ) : int
selected int
options UnityEngine.GUIContent
style UnityEngine.GUIStyle
return int
        internal static int CycleButton(int selected, GUIContent[] options, GUIStyle style)
        {
            if (GUILayout.Button(options[selected], style, new GUILayoutOption[0]))
            {
                selected++;
                if (selected >= options.Length)
                {
                    selected = 0;
                }
            }
            return selected;
        }