コード例 #1
0
        private void OnLoadProject(UTinyProject project)
        {
            var sceneView = SceneView.sceneViews.Count > 0 ? SceneView.sceneViews[0] as SceneView : null;

            // crush the scene view
            if (null != sceneView)
            {
                sceneView.in2DMode        = true;
                sceneView.m_SceneLighting = false;
#if UNITY_2017_2_OR_NEWER
                sceneView.sceneViewState.showFog            = false;
                sceneView.sceneViewState.showMaterialUpdate = false;
                sceneView.sceneViewState.showSkybox         = false;
                sceneView.sceneViewState.showFlares         = false;
                sceneView.sceneViewState.showImageEffects   = false;
#endif
            }

            s_GuiContents          = new GUIContents(UTinyEditorApplication.ContextType);
            m_ModuleSettingsPanel  = new UTinyModuleSettingsPanel(project.Registry, project.Module);
            m_ProjectSettingsPanel = new UTinyProjectSettingsPanel(project.Registry, (UTinyProject.Reference)project);
            m_ModulePanel          = new UTinyModulePanel(project.Registry, (UTinyProject.Reference)project, project.Module, m_ModulePanelState);
            m_EntityGroupPanel     = new UTinyEntityGroupPanel(project.Registry, project.Module, m_ScenePanelState);
            m_TypePanel            = new UTinyTypePanel(project.Registry, project.Module, m_TypePanelState);
            m_CodePanel            = new UTinyCodePanel(project.Registry, project.Module, m_CodePanelState);
            m_AssetPanel           = new UTinyAssetPanel(project.Registry, (UTinyProject.Reference)project, project.Module, m_AssetPanelState);
            m_BuildReportPanel     = new UTinyBuildReportPanel(project.Registry, project.Module, m_BuildReportState);
        }
コード例 #2
0
ファイル: DIGUI.cs プロジェクト: xenosl/DebugInspector
        public static bool GoUpButton(Rect rect)
        {
            //var rect = GetGoUpButtonRect();
            var content = GUIContents.Temp1(DIIcons.TurnUp);

            return(GUI.Button(rect, content, DIGUIStyles.GoUpButton));
        }
コード例 #3
0
    public static Rect Horizontal(GUIContents contents, GUIStyle style, params GUILayoutOption[] options)
    {
        Rect rect = EditorGUILayout.BeginHorizontal(style, options);
            contents();
        EditorGUILayout.EndHorizontal();

        return rect;
    }
コード例 #4
0
        private void InitializeGUIContents()
        {
            this.guiContents = new GUIContents();

            var copyrightLabel = string.Concat("Mulligan Renamer v", VersionString, ", ©2018 RedBlueGames");

            this.guiContents.CopyrightLabel = new GUIContent(copyrightLabel);

            var renameOpsLabel = new GUIContent("Rename Operations");

            this.guiContents.RenameOpsLabel = renameOpsLabel;
        }
コード例 #5
0
        private void InitializeGUIContents()
        {
            this.guiContents = new GUIContents();

            this.guiContents.DropPrompt = new GUIContent(
                "No objects specified for rename. Drag objects here to rename them, or");

            this.guiContents.DropPromptHint = new GUIContent(
                "Add more objects by dragging them here");

            var copyrightLabel = string.Concat("Mulligan Renamer v", VersionString, ", ©2017 RedBlueGames");

            this.guiContents.CopyrightLabel = new GUIContent(copyrightLabel);
        }
コード例 #6
0
        public void OnGUI()
        {
            Init();

            if (s_GuiContents == null)
            {
                s_GuiContents = new GUIContents();
            }
            AudioMixerDrawUtils.InitStyles();

            DetectControllerChange();

            m_GroupViews.OnEvent();
            m_SnapshotListView.OnEvent();

            DoToolbar();

            List <AudioMixerGroupController> allGroups;

            if (m_Controller != null)
            {
                allGroups = m_Controller.GetAllAudioGroupsSlow();
            }
            else
            {
                allGroups = new List <AudioMixerGroupController>();
            }

            var effectMap = GetEffectMap(allGroups);

            m_GroupTree.UseScrollView(m_LayoutMode == LayoutMode.Horizontal);

            if (m_LayoutMode == LayoutMode.Horizontal)
            {
                LayoutWithStripsOnTop(allGroups, effectMap);
            }
            else
            {
                LayoutWithStripsOnRightSideOneScrollBar(allGroups, effectMap);
            }

            // Ensure valid layout after maximizing window
            if (m_LastSize.x != position.width || m_LastSize.y != position.height)
            {
                m_RepaintCounter = 2;
                m_LastSize       = new Vector2(position.width, position.height);
            }

            RepaintIfNeeded();
        }
コード例 #7
0
        private void InitializeGUIContents()
        {
            this.guiContents = new GUIContents();

            this.guiContents.DropPrompt = new GUIContent(
                "No objects specified for rename. Drag objects here to rename them, or");

            this.guiContents.DropPromptHintInsideScroll = new GUIContent(
                "Add more objects by dragging them here");

            this.guiContents.DropPromptHint = new GUIContent(
                "Add more objects by dragging them into the above panel");

            this.guiContents.DropPromptRepeat = new GUIContent(
                "To rename more objects, drag them here, or");
        }
コード例 #8
0
        private void OnGUI()
        {
            try
            {
                if (s_GuiContents == null)
                {
                    s_GuiContents = new GUIContents(UTinyEditorApplication.ContextType);
                }

                GUI.enabled = !EditorApplication.isPlayingOrWillChangePlaymode;

                DoLayout();
                GUI.enabled = true;
            }
            catch (ExitGUIException)
            {
                throw;
            }
            catch (Exception e)
            {
                TinyEditorAnalytics.SendExceptionOnce("Editor.OnGUI", e);
                throw;
            }
        }
コード例 #9
0
 public static void Area(GUIContents contents, Rect screenRect)
 {
     GUILayout.BeginArea(screenRect);
         contents();
     GUILayout.EndArea();
 }