コード例 #1
0
 public GameViewSizeMenu(IFlexibleMenuItemProvider itemProvider, int selectionIndex, FlexibleMenuModifyItemUI modifyItemUi, IGameViewSizeMenuUser gameView)
     : base(itemProvider, selectionIndex, modifyItemUi, gameView.SizeSelectionCallback)
 {
     m_GameView = gameView;
 }
コード例 #2
0
 internal static void GameViewSizePopup(GameViewSizeGroupType groupType, int selectedIndex, IGameViewSizeMenuUser gameView, GUIStyle style, params GUILayoutOption[] options)
 {
     s_LastRect = GetControlRect(false, EditorGUI.kSingleLineHeight, style, options);
     EditorGUI.GameViewSizePopup(s_LastRect, groupType, selectedIndex, gameView, style);
 }
コード例 #3
0
        internal static void GameViewSizePopup(Rect buttonRect, GameViewSizeGroupType groupType, int selectedIndex, IGameViewSizeMenuUser gameView, GUIStyle guiStyle)
        {
            var group = GameViewSizes.instance.GetGroup(groupType);
            var text  = "";

            if (selectedIndex >= 0 && selectedIndex < group.GetTotalCount())
            {
                text = group.GetGameViewSize(selectedIndex).displayText;
            }

            if (EditorGUI.DropdownButton(buttonRect, GUIContent.Temp(text), FocusType.Passive, guiStyle))
            {
                var menuData     = new GameViewSizesMenuItemProvider(groupType);
                var flexibleMenu = new GameViewSizeMenu(menuData, selectedIndex, new GameViewSizesMenuModifyItemUI(), gameView);
                PopupWindow.Show(buttonRect, flexibleMenu);
            }
        }
コード例 #4
0
 public GameViewSizeMenu(IFlexibleMenuItemProvider itemProvider, int selectionIndex, FlexibleMenuModifyItemUI modifyItemUi, IGameViewSizeMenuUser gameView) : base(itemProvider, selectionIndex, modifyItemUi, new Action <int, object>(gameView.SizeSelectionCallback))
 {
     this.m_GameView = gameView;
 }
コード例 #5
0
 public GameViewSizeMenu(IFlexibleMenuItemProvider itemProvider, int selectionIndex, FlexibleMenuModifyItemUI modifyItemUi, IGameViewSizeMenuUser gameView) : base(itemProvider, selectionIndex, modifyItemUi, new Action<int, object>(gameView, (IntPtr) gameView.SizeSelectionCallback))
 {
     this.m_GameView = gameView;
 }
コード例 #6
0
 internal static void GameViewSizePopup(GameViewSizeGroupType groupType, int selectedIndex, IGameViewSizeMenuUser gameView, GUIStyle style, params GUILayoutOption[] options)
 {
     s_LastRect = GetControlRect(false, 16f, style, options);
     EditorGUI.GameViewSizePopup(s_LastRect, groupType, selectedIndex, gameView, style);
 }