private void RenderObjectGroupSelectionPopup()
        {
            ObjectGroupDatabase objectGroupDatabase = Octave3DWorldBuilder.ActiveInstance.PlacementObjectGroupDatabase;

            if (objectGroupDatabase.NumberOfGroups == 0)
            {
                EditorGUILayoutEx.InformativeLabel("No object groups are currently available.");
                return;
            }

            PrefabCategoryDatabase prefabCategoryDatabase = PrefabCategoryDatabase.Get();
            PrefabCategory         activeCategory         = prefabCategoryDatabase.ActivePrefabCategory;

            List <ObjectGroup> allObjectGroups = objectGroupDatabase.GetAllObjectGroups();

            if (activeCategory.ObjectGroup == null)
            {
                activeCategory.SetObjectGroup(allObjectGroups[0]);
            }

            int currentGroupIndex = allObjectGroups.FindIndex(0, item => item == activeCategory.ObjectGroup);

            if (currentGroupIndex < 0)
            {
                return;
            }

            int newGroupIndex = EditorGUILayoutEx.Popup(GetContentForObjectGroupSelectionPopup(), currentGroupIndex, objectGroupDatabase.GetAllObjectGroupNames());

            if (newGroupIndex != currentGroupIndex)
            {
                UndoEx.RecordForToolAction(activeCategory);
                activeCategory.SetObjectGroup(allObjectGroups[newGroupIndex]);
            }
        }
Ejemplo n.º 2
0
        private void RenderContentInScrollView()
        {
            EditorGUILayoutEx.InformativeLabel("Please choose the settings you wish to save.");
            Octave3DWorldBuilder.ActiveInstance.ConfigSaveSettings.View.Render();

            EditorGUILayout.Separator();
            RenderSaveButton();
        }
        protected override void RenderContent()
        {
            RenderUseTileConnectionsToggle();
            if (_settings.UseTileConnections)
            {
                EditorGUILayoutEx.InformativeLabel("When using tile connections, the extension plane will always reside at the bottom of the placement guide in its local space.");
                RenderSetCommonPropertiesControls();
                RenderRemoveAllPrefabAssociationsButton();

                EditorGUILayout.Separator();
                PrefabsToPathTileConectionDropEventHandler.Get().DropSettings.View.Render();
                RenderViewForEachTileConnectionType();
            }
        }
Ejemplo n.º 4
0
        protected override void RenderContent()
        {
            if (_database.IsEmpty)
            {
                EditorGUILayoutEx.InformativeLabel("There are no brushes currently available.");
            }
            else
            {
                RenderActiveBrushControls();
            }

            EditorGUILayout.Separator();
            RenderBrushActionControls();
        }
Ejemplo n.º 5
0
        protected override void RenderContent()
        {
            if (!PrefabTagDatabase.Get().IsEmpty)
            {
                _prefabTagDatabase.PrefabTagFilter.View.Render();
                RenderPrefabTagScrollView();
            }
            else
            {
                EditorGUILayoutEx.InformativeLabel("There are no prefab tags to display.");
            }

            RenderActionControls();
        }
Ejemplo n.º 6
0
        protected override void RenderContent()
        {
            Prefab activePrefab = PrefabQueries.GetActivePrefab();

            if (activePrefab != null)
            {
                RenderActivePrefabPreviewButtonAndNextPrevControls(activePrefab);
                activePrefab.View.Render();
            }
            else
            {
                EditorGUILayoutEx.InformativeLabel("There is no active prefab currently available.");
            }
        }
        protected override void RenderContent()
        {
            ObjectPlacementPathTileConnectionConfigurationDatabase configurationDatabase = ObjectPlacementPathTileConnectionConfigurationDatabase.Get();

            if (configurationDatabase.IsEmpty)
            {
                EditorGUILayoutEx.InformativeLabel("There are no tile connection configurations available.");
            }
            else
            {
                RenderActiveConfigurationSelectionPopup();
                RenderActiveConfigurationNameChangeField();
            }
        }
 protected override void RenderContent()
 {
     if (_database.IsEmpty)
     {
         EditorGUILayoutEx.InformativeLabel("There are no height patterns currently available.");
     }
     else
     {
         _database.HeightPatternFilter.View.Render();
         RenderPatternScrollView();
         RenderActivePatternButtonColorField();
         RenderPatternScrollViewHeightSlider();
     }
     RenderActionButtons();
 }
Ejemplo n.º 9
0
        protected override void RenderContent()
        {
            if (_database.IsEmpty)
            {
                EditorGUILayoutEx.InformativeLabel("There are no object groups currently available.");
            }
            else
            {
                RenderActiveGroupSelectionPopup();
                _database.ActiveGroup.View.Render();
            }

            RenderActionControls();
            RenderPreserveGroupChildrenToggle();
        }
        private void RenderActiveCategoryNameChangeTextField()
        {
            PrefabCategoryDatabase prefabCategoryDatabase = PrefabCategoryDatabase.Get();
            PrefabCategory         activeCategory         = prefabCategoryDatabase.ActivePrefabCategory;

            if (prefabCategoryDatabase.CanPrefabCategoryBeRenamed(activeCategory))
            {
                string newString = EditorGUILayoutEx.DelayedTextField(GetContentForActiveCategoryNameChangeField(), activeCategory.Name);
                if (newString != activeCategory.Name)
                {
                    UndoEx.RecordForToolAction(activeCategory);
                    prefabCategoryDatabase.RenamePrefabCategory(activeCategory, newString);
                }
            }
            else
            {
                EditorGUILayoutEx.InformativeLabel("The default category can not be renamed.");
            }
        }
Ejemplo n.º 11
0
        protected override void RenderContent()
        {
            if (PrefabTagDatabase.Get().IsEmpty)
            {
                EditorGUILayoutEx.InformativeLabel("There are no prefab tags to display.");
            }
            else
            {
                AcquireFilteredPrefabTags();

                if (_prefabTagFilter != null)
                {
                    _prefabTagFilter.View.Render();
                }
                RenderPrefabTagSelectionScrollView();
                RenderSelectDeselectAllTagsButtons();
                RenderSelectDeselectOnlyFilteredTagsButtons();
            }
        }