コード例 #1
0
ファイル: VMEFileManagerPanel.cs プロジェクト: TorresLabs/VME
        public override void DrawContent()
        {
            base.DrawContent();

            VoxelMap map = voxelMap;

            voxelMap = (VoxelMap)EditorGUILayout.ObjectField(voxelMap, typeof(VoxelMap), true);
            if (voxelMap != map)
            {
                OnVoxelMapChanged();
            }

            if (voxelMap != null)
            {
                VoxelSwatch swatch = voxelSwatch;
                voxelSwatch = (VoxelSwatch)EditorGUILayout.ObjectField(voxelSwatch, typeof(VoxelSwatch), true);

                if (voxelSwatch != swatch)
                {
                    OnVoxelSwatchChanged();
                }

                if (voxelSwatch != null)
                {
                    if (GUILayout.Button("Reload Swatch."))
                    {
                        voxelSwatch.LoadSwatches();
                    }
                }
            }
        }
コード例 #2
0
 public VSCategory(string _name, string _directoryPath, VoxelSwatch _voxelSwatchReference)
 {
     categoryName         = _name;
     directoryPath        = _directoryPath;
     tilegroups           = new List <VSTileGroup>();
     voxelSwatchReference = _voxelSwatchReference;
 }
コード例 #3
0
        public override void DrawContent () {
            base.DrawContent();

            VoxelMap map = voxelMap;
            voxelMap = (VoxelMap)EditorGUILayout.ObjectField(voxelMap, typeof(VoxelMap), true);
            if (voxelMap != map) {

                OnVoxelMapChanged();

            }

            if (voxelMap != null) {

                VoxelSwatch swatch = voxelSwatch;
                voxelSwatch = (VoxelSwatch)EditorGUILayout.ObjectField(voxelSwatch, typeof(VoxelSwatch), true);

                if (voxelSwatch != swatch) {

                    OnVoxelSwatchChanged();

                }

                if (voxelSwatch != null) {

                    if (GUILayout.Button("Reload Swatch.")) {

                        voxelSwatch.LoadSwatches();

                    }

                }

            }

        }
コード例 #4
0
        /// <summary>
        /// When the voxel swatch is changed
        /// </summary>
        /// <param name="_swatch">the new swatch</param>
        public void OnVoxelSwatchChanged(VoxelSwatch _swatch)
        {
            swatchReference = _swatch;

            if (swatchReference != null)
            {
                SetCategory(0);
                swatchReference.LoadSwatches();
            }
        }
コード例 #5
0
        public override void DrawContent()
        {
            base.DrawContent();

            EditorGUILayout.BeginHorizontal("box");

            VoxelSwatch = (VoxelSwatch)EditorGUILayout.ObjectField(VoxelSwatch, typeof(VoxelSwatch), false, GUILayout.Width(150));

            DrawHeaderButtons();

            EditorGUILayout.EndHorizontal();
        }
コード例 #6
0
ファイル: VMEFileManagerPanel.cs プロジェクト: TorresLabs/VME
        private void OnVoxelMapChanged()
        {
            if (voxelMap != null)
            {
                voxelSwatch = voxelMap.voxelSwatch;
            }
            else
            {
            }

            if (OnVoxelMapChangedEvent != null)
            {
                OnVoxelMapChangedEvent(voxelMap);
            }
        }
コード例 #7
0
        /// <summary>
        /// Sets a new VoxelSwatch.
        /// </summary>
        /// <param name="_swatch">The Swatch</param>
        public void SetVoxelSwatch(VoxelSwatch _swatch)
        {
            voxelSwatch = _swatch;

            if (_swatch != null)
            {
                categoryCount = voxelSwatch.categories.Count;
            }
            else
            {
                categoryCount = 0;
            }

            currentCategory = 0;
            SetCategory(currentCategory);
        }
コード例 #8
0
ファイル: VMEWindow.cs プロジェクト: TorresLabs/VME
        /// <summary>
        /// Called when the swatch is changed.
        /// </summary>
        /// <param name="_swatch">The swatch that it is changed into.</param>
        private void FileManager_OnVoxelSwatchChangedEvent(VoxelSwatch _swatch)
        {
            if (_swatch != null)  //If theres no swatch selected.

            {
                chunkPanel.SetState(true);
                swatchPanel.SetState(true);
                swatchPanel.SetVoxelSwatch(_swatch);
            }
            else    //If there is a swatch selected.

            {
                chunkPanel.SetState(false);
                swatchPanel.SetState(false);
                swatchPanel.SetVoxelSwatch(null);
            }
        }
コード例 #9
0
        private void OnVoxelMapChanged () {
            
            if (voxelMap != null) {

                voxelSwatch = voxelMap.voxelSwatch;
               
            }
            else {
              
                
            }

            if (OnVoxelMapChangedEvent != null) {

                OnVoxelMapChangedEvent(voxelMap);

            }

        }
コード例 #10
0
        /// <summary>
        /// When the voxel swatch is changed
        /// </summary>
        /// <param name="_swatch">the new swatch</param>
        public void OnVoxelSwatchChanged (VoxelSwatch _swatch) {

            swatchReference = _swatch;

            if (swatchReference != null) {

                SetCategory(0);
                swatchReference.LoadSwatches();

            }

        }
コード例 #11
0
ファイル: VMEWindow.cs プロジェクト: KevinBreurken/VME
        /// <summary>
        /// Called when the swatch is changed.
        /// </summary>
        /// <param name="_swatch">The swatch that it is changed into.</param>
        private void FileManager_OnVoxelSwatchChangedEvent (VoxelSwatch _swatch) {

            if (_swatch != null) {//If theres no swatch selected.

                chunkPanel.SetState(true);
                swatchPanel.SetState(true);
                swatchPanel.SetVoxelSwatch(_swatch);

            } else {//If there is a swatch selected.

                chunkPanel.SetState(false);
                swatchPanel.SetState(false);
                swatchPanel.SetVoxelSwatch(null);

            }

        }
コード例 #12
0
ファイル: VSEHeader.cs プロジェクト: KevinBreurken/VME
        public override void DrawContent () {

            base.DrawContent();

            EditorGUILayout.BeginHorizontal("box");

            VoxelSwatch = (VoxelSwatch)EditorGUILayout.ObjectField(VoxelSwatch, typeof(VoxelSwatch), false, GUILayout.Width(150));

            DrawHeaderButtons();

            EditorGUILayout.EndHorizontal();

        }
コード例 #13
0
ファイル: VoxelSwatch.cs プロジェクト: KevinBreurken/VME
    public VSCategory (string _name,string _directoryPath,VoxelSwatch _voxelSwatchReference) {

        categoryName = _name;
        directoryPath = _directoryPath;
        tilegroups = new List<VSTileGroup>();
        voxelSwatchReference = _voxelSwatchReference;

    }
コード例 #14
0
        /// <summary>
        /// Sets a new VoxelSwatch.
        /// </summary>
        /// <param name="_swatch">The Swatch</param>
        public void SetVoxelSwatch (VoxelSwatch _swatch) {

            voxelSwatch = _swatch;

            if (_swatch != null) {

                categoryCount = voxelSwatch.categories.Count;
               

            } else {

                categoryCount = 0;

            }

            currentCategory = 0;
            SetCategory(currentCategory);

        }
コード例 #15
0
ファイル: VSEWindow.cs プロジェクト: KevinBreurken/VME
        /// <summary>
        /// When the voxel swatch is changed.
        /// </summary>
        /// <param name="_swatch">the new swatch.</param>
        private void OnVoxelSwatchChangedEvent (VoxelSwatch _swatch) {



        }
コード例 #16
0
 /// <summary>
 /// When the voxel swatch is changed.
 /// </summary>
 /// <param name="_swatch">the new swatch.</param>
 private void OnVoxelSwatchChangedEvent(VoxelSwatch _swatch)
 {
 }