private void RenderActiveConfigurationNameChangeField()
        {
            ObjectPlacementPathTileConnectionConfiguration activeConfiguration = ObjectPlacementPathTileConnectionConfigurationDatabase.Get().ActiveConfiguration;
            string newString = EditorGUILayoutEx.DelayedTextField(GetContentForActiveConfigurationNameChangeField(), activeConfiguration.Name);

            if (newString != activeConfiguration.Name)
            {
                UndoEx.RecordForToolAction(activeConfiguration);
                activeConfiguration.Name = newString;
            }
        }
Ejemplo n.º 2
0
        protected override void RenderContent()
        {
            _settings.TileConnectionSettings.View.Render();

            if (_settings.TileConnectionSettings.UseTileConnections)
            {
                _activeObjectPlacementPathTileConnectionConfigurationView.Render();
                ObjectPlacementPathTileConnectionConfigurationDatabase.Get().View.Render();
            }

            EditorGUILayout.Separator();
            _settings.ManualConstructionSettings.View.Render();
        }
        protected override void RenderContent()
        {
            ObjectPlacementPathTileConnectionConfigurationDatabase configurationDatabase = ObjectPlacementPathTileConnectionConfigurationDatabase.Get();

            if (configurationDatabase.IsEmpty)
            {
                EditorGUILayout.HelpBox("There are no tile connection configurations currently available.", UnityEditor.MessageType.None);
            }
            else
            {
                RenderActiveConfigurationSelectionPopup();
                RenderActiveConfigurationNameChangeField();
            }
        }
        protected override void RenderContent()
        {
            ObjectPlacementPathTileConnectionConfigurationDatabase configurationDatabase = ObjectPlacementPathTileConnectionConfigurationDatabase.Get();

            if (configurationDatabase.IsEmpty)
            {
                EditorGUILayoutEx.InformativeLabel("There are no tile connection configurations available.");
            }
            else
            {
                RenderActiveConfigurationSelectionPopup();
                RenderActiveConfigurationNameChangeField();
            }
        }
        private void RenderActiveConfigurationSelectionPopup()
        {
            ObjectPlacementPathTileConnectionConfigurationDatabase configurationDatabase = ObjectPlacementPathTileConnectionConfigurationDatabase.Get();
            string newString = EditorGUILayoutEx.Popup(GetContentForActiveConfigurationSelectionPopup(), configurationDatabase.ActiveConfiguration.Name, configurationDatabase.GetAllConfigurationNames());

            if (newString != configurationDatabase.ActiveConfiguration.Name)
            {
                ObjectPlacementPathTileConnectionConfiguration newActiveConfiguration = configurationDatabase.GetConfigurationByName(newString);
                if (newActiveConfiguration != null)
                {
                    UndoEx.RecordForToolAction(configurationDatabase);
                    PathObjectPlacement.Get().PathSettings.TileConnectionSettings.RecordAllTileConnectionTypeSettingsForUndo();
                    configurationDatabase.SetActiveConfiguration(newActiveConfiguration);
                    newActiveConfiguration.ApplyConfigurationDataToSettings(PathObjectPlacement.Get().PathSettings.TileConnectionSettings);
                }
            }
        }
Ejemplo n.º 6
0
 public ObjectPlacementPathTileConnectionConfigurationDatabaseView(ObjectPlacementPathTileConnectionConfigurationDatabase database)
 {
     _database = database;
 }