Ejemplo n.º 1
0
        private void OnGUI()
        {
            InitStyles();
            if (Event.current.type == EventType.Layout)
            {
                systemListView.ReloadIfNecessary();
                filterUI.GetTypes();
                entityQueryListView.ReloadIfNecessary();
                entityListView.ReloadIfNecessary();
            }

            if (Selection.activeObject == selectionProxy)
            {
                if (!selectionProxy.Exists)
                {
                    Selection.activeObject = null;
                    entityListView.SelectNothing();
                }
            }

            {
                GUILayout.BeginArea(new Rect(0f, 0f, kSystemListWidth, position.height)); // begin System side
                SystemHeader();

                GUILayout.BeginVertical(Styles.BoxStyle);
                SystemList();
                GUILayout.EndVertical();

                GUILayout.EndArea(); // end System side
            }

            GUILayout.BeginArea(new Rect(kSystemListWidth, 0, position.width - kSystemListWidth, position.height));
            {
                float toolbarHeight = Styles.ToolbarStyle.fixedHeight;
                GUILayout.BeginArea(new Rect(0, 0, position.width - kSystemListWidth, toolbarHeight));
                EntityHeader();
                GUILayout.EndArea();

                if (HasWorld())
                {
                    // add a slight 1px left and right margin
                    GUILayout.BeginArea(new Rect(0, toolbarHeight, CurrentEntityViewWidth, position.height - toolbarHeight));
                    EntityQueryList();
                    EntityList();
                    GUILayout.EndArea();

                    if (showingChunkInfoView && entityListView.ShowingSomething)
                    {
                        GUILayout.BeginArea(new Rect(CurrentEntityViewWidth, toolbarHeight, kChunkInfoViewWidth, position.height - toolbarHeight));
                        ChunkInfoView();
                        GUILayout.EndArea();
                    }
                }
            }
            GUILayout.EndArea();

            repaintLimiter.RecordRepaint();
        }
Ejemplo n.º 2
0
        private void OnGUI()
        {
            InitStyles();
            if (Event.current.type == EventType.Layout)
            {
                systemListView.ReloadIfNecessary();
                filterUI.GetTypes();
                entityQueryListView.ReloadIfNecessary();
                entityListView.ReloadIfNecessary();
            }

            if (Selection.activeObject == selectionProxy)
            {
                if (!selectionProxy.Exists)
                {
                    Selection.activeObject = null;
                    entityListView.SelectNothing();
                }
            }
            GUILayout.BeginArea(new Rect(0f, 0f, kSystemListWidth, position.height)); // begin System side
            SystemHeader();

            GUILayout.BeginVertical(Styles.BoxStyle);
            SystemList();
            GUILayout.EndVertical();

            GUILayout.EndArea(); // end System side

            EntityHeader();

            GUILayout.BeginArea(new Rect(kSystemListWidth, kLineHeight, CurrentEntityViewWidth, position.height - kLineHeight));
            EntityQueryList();
            EntityList();
            GUILayout.EndArea();

            if (showingChunkInfoView)
            {
                GUILayout.BeginArea(new Rect(kSystemListWidth + CurrentEntityViewWidth, 0f, kChunkInfoViewWidth + 1, position.height));
                ChunkInfoView();
                GUILayout.EndArea();
            }

            repaintLimiter.RecordRepaint();
        }