Ejemplo n.º 1
0
 private void ChunkInfoView()
 {
     GUILayout.BeginHorizontal(BoxStyle);
     if (entityListView.ShowingSomething)
     {
         GUILayout.Label($"Matching chunks: {entityListView.ChunkArray.Length}");
     }
     GUILayout.FlexibleSpace();
     ChunkInfoToggle(GUILayoutUtility.GetRect(kChunkInfoButtonWidth, kLineHeight));
     GUILayout.EndHorizontal();
     if (entityListView.ShowingSomething)
     {
         GUILayout.BeginHorizontal(BoxStyle);
         chunkInfoListView.OnGUI(GUIHelpers.GetExpandingRect());
         GUILayout.EndHorizontal();
         if (chunkInfoListView.HasSelection())
         {
             GUILayout.BeginHorizontal();
             GUILayout.FlexibleSpace();
             if (GUILayout.Button("Clear Selection"))
             {
                 chunkInfoListView.ClearSelection();
                 EditorGUIUtility.ExitGUI();
             }
             GUILayout.EndHorizontal();
         }
     }
 }
Ejemplo n.º 2
0
 void EntityList()
 {
     if (HasWorld())
     {
         GUILayout.BeginVertical(Styles.BoxStyle);
         entityListView.OnGUI(GUIHelpers.GetExpandingRect());
         GUILayout.EndVertical();
     }
 }
        void ComponentGroupList()
        {
            if (SystemSelection is ComponentSystemBase)
            {
                GUILayout.BeginVertical(Box, GUILayout.Height(componentGroupListView.Height + 4f));

                componentGroupListView.OnGUI(GUIHelpers.GetExpandingRect());
                GUILayout.EndVertical();
            }
        }
        void EntityList()
        {
            var showingAllEntities        = !(SystemSelection is ComponentSystemBase);
            var componentGroupHasEntities = ComponentGroupSelection != null && !ComponentGroupSelection.IsEmptyIgnoreFilter;
            var somethingToShow           = showingAllEntities || componentGroupHasEntities;

            if (WorldSelection == null || !somethingToShow)
            {
                return;
            }
            entityListView.OnGUI(GUIHelpers.GetExpandingRect());
        }
        void SystemList()
        {
            var rect = GUIHelpers.GetExpandingRect();

            if (World.AllWorlds.Count != 0)
            {
                systemListView.OnGUI(rect);
            }
            else
            {
                GUIHelpers.ShowCenteredNotification(rect, "No systems (Try pushing Play)");
            }
        }
Ejemplo n.º 6
0
        void ComponentGroupList()
        {
            if (SystemSelection is ComponentSystemBase)
            {
                GUILayout.BeginVertical(Box, GUILayout.Height(componentGroupListView.Height + Box.padding.bottom + Box.padding.top));

                componentGroupListView.OnGUI(GUIHelpers.GetExpandingRect());
                GUILayout.EndVertical();
            }
            else if (WorldSelection != null)
            {
                filterUI.OnGUI();
            }
        }
Ejemplo n.º 7
0
        private void ComponentGroupList()
        {
            if (SystemSelection is ComponentSystemBase)
            {
                GUILayout.BeginVertical(Box, GUILayout.Height(componentGroupListView.Height + Box.padding.bottom + Box.padding.top));

                componentGroupListView.OnGUI(GUIHelpers.GetExpandingRect());
                GUILayout.EndVertical();
            }
            else if (WorldSelection != null)
            {
                GUILayout.BeginHorizontal();
                filterUI.OnGUI();
                GUILayout.FlexibleSpace();
                GUILayout.Label(entityListView.EntityCount.ToString());
                GUILayout.EndHorizontal();
            }
        }
Ejemplo n.º 8
0
        private void EntityQueryList()
        {
            if (SystemSelection != null)
            {
                entityQueryListView.SetWidth(CurrentEntityViewWidth);
                var height = Mathf.Min(entityQueryListView.Height + Styles.BoxStyle.padding.vertical, position.height * 0.5f);
                GUILayout.BeginVertical(Styles.BoxStyle, GUILayout.Height(height));

                entityQueryListView.OnGUI(GUIHelpers.GetExpandingRect());
                GUILayout.EndVertical();
            }
            else if (WorldSelection != null)
            {
                GUILayout.BeginVertical();
                filterUI.OnGUI(entityListView.EntityCount);
                GUILayout.EndVertical();
            }
        }
Ejemplo n.º 9
0
        private void ComponentGroupList()
        {
            if (SystemSelection is ComponentSystemBase)
            {
                componentGroupListView.SetWidth(CurrentEntityViewWidth);
                var height = Mathf.Min(componentGroupListView.Height + BoxStyle.padding.vertical, position.height * 0.5f);
                GUILayout.BeginVertical(BoxStyle, GUILayout.Height(height));

                componentGroupListView.OnGUI(GUIHelpers.GetExpandingRect());
                GUILayout.EndVertical();
            }
            else if (WorldSelection != null)
            {
                GUILayout.BeginHorizontal();
                filterUI.OnGUI();
                GUILayout.FlexibleSpace();
                GUILayout.Label(entityListView.EntityCount.ToString());
                GUILayout.EndHorizontal();
            }
        }
Ejemplo n.º 10
0
        private void ChunkInfoView()
        {
            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            ChunkInfoToggle();
            GUILayout.EndHorizontal();
            var chunkArray = entityListView.ChunkArray;

            if (chunkArray.IsCreated && entityListView.ShowingSomething)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label($"Matching chunks: {chunkArray.Length}");
                GUILayout.FlexibleSpace();
                if (chunkInfoListView.HasSelection() && GUILayout.Button("Clear Selection"))
                {
                    chunkInfoListView.ClearSelection();
                    EditorGUIUtility.ExitGUI();
                }
                GUILayout.EndHorizontal();
                chunkInfoListView.SetChunkArray(chunkArray);
                chunkInfoListView.OnGUI(GUIHelpers.GetExpandingRect());
            }
        }
Ejemplo n.º 11
0
        private void ChunkInfoView()
        {
            GUILayout.BeginVertical(Styles.BoxStyle);

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            GUILayout.Label($"Matching chunks: {entityListView.ChunkArray.Length}", Styles.LabelStyle);
            GUILayout.EndHorizontal();

            chunkInfoListView.OnGUI(GUIHelpers.GetExpandingRect());
            if (chunkInfoListView.HasSelection())
            {
                GUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Clear Selection"))
                {
                    chunkInfoListView.ClearSelection();
                    EditorGUIUtility.ExitGUI();
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndVertical();
        }
Ejemplo n.º 12
0
 void EntityList()
 {
     GUILayout.BeginVertical(Box);
     entityListView.OnGUI(GUIHelpers.GetExpandingRect());
     GUILayout.EndVertical();
 }
Ejemplo n.º 13
0
 private void OnGUI()
 {
     typeListView.searchString = searchField.OnGUI(typeListView.searchString, GUILayout.Height(20f), GUILayout.ExpandWidth(true));
     typeListView.OnGUI(GUIHelpers.GetExpandingRect());
 }