Exemplo n.º 1
0
        internal static void GameViewOnPlayPopup(Rect buttonRect, int selectedIndex, IGameViewOnPlayMenuUser gameView, GUIStyle guiStyle)
        {
            var text = GameViewOnPlayMenu.GetOnPlayBehaviorName(selectedIndex);

            if (EditorGUI.DropdownButton(buttonRect, GUIContent.Temp(text), FocusType.Passive, guiStyle))
            {
                var menuData     = new GameViewOnPlayMenuItemProvider();
                var flexibleMenu = new GameViewOnPlayMenu(menuData, selectedIndex, null, gameView);
                PopupWindow.Show(buttonRect, flexibleMenu);
            }
        }
 public string GetName(int index)
 {
     return(GameViewOnPlayMenu.GetOnPlayBehaviorName(index));
 }