public GameViewSizeMenu(IFlexibleMenuItemProvider itemProvider, int selectionIndex, FlexibleMenuModifyItemUI modifyItemUi, IGameViewSizeMenuUser gameView) : base(itemProvider, selectionIndex, modifyItemUi, gameView.SizeSelectionCallback) { m_GameView = gameView; }
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); }
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); } }
public GameViewSizeMenu(IFlexibleMenuItemProvider itemProvider, int selectionIndex, FlexibleMenuModifyItemUI modifyItemUi, IGameViewSizeMenuUser gameView) : base(itemProvider, selectionIndex, modifyItemUi, new Action <int, object>(gameView.SizeSelectionCallback)) { this.m_GameView = gameView; }
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; }
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); }