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]); } }
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(); } }
protected override void RenderContent() { if (_database.IsEmpty) { EditorGUILayoutEx.InformativeLabel("There are no brushes currently available."); } else { RenderActiveBrushControls(); } EditorGUILayout.Separator(); RenderBrushActionControls(); }
protected override void RenderContent() { if (!PrefabTagDatabase.Get().IsEmpty) { _prefabTagDatabase.PrefabTagFilter.View.Render(); RenderPrefabTagScrollView(); } else { EditorGUILayoutEx.InformativeLabel("There are no prefab tags to display."); } RenderActionControls(); }
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(); }
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."); } }
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(); } }