소스 검색

Clean up stuff

Some panes forget to re-enable GUI when they need to modify GUI state.
habeebweeb 4 년 전
부모
커밋
58d5dfce2b

+ 0 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/PoseWindowPanes/CopyPosePane.cs

@@ -1,4 +1,3 @@
-using System;
 using System.Linq;
 using System.Collections.Generic;
 using UnityEngine;

+ 2 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/PoseWindowPanes/MaidDressingPane.cs

@@ -287,6 +287,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             pantsuShiftToggle.Draw();
             GUILayout.FlexibleSpace();
             GUILayout.EndHorizontal();
+
+            GUI.enabled = true;
         }
     }
 }

+ 2 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/PoseWindowPanes/MaidFreeLookPane.cs

@@ -64,6 +64,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             lookXSlider.Draw();
             lookYSlider.Draw();
             GUILayout.EndHorizontal();
+
+            GUI.enabled = true;
         }
     }
 }

+ 1 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/PoseWindowPanes/MaidIKPane.cs

@@ -65,6 +65,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             GUI.enabled = active ? this.ikToggle.Value : false;
             this.boneIKToggle.Draw();
             GUILayout.EndHorizontal();
+            GUI.enabled = true;
         }
     }
 }

+ 4 - 3
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/PoseWindowPanes/SavePosePane.cs

@@ -7,7 +7,6 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
     {
         private MeidoManager meidoManager;
         private Button savePoseButton;
-        private Button deletePoseButton;
         private TextField poseNameTextField;
         private ComboBox categoryComboBox;
         private string categoryHeader;
@@ -28,7 +27,6 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             this.savePoseButton = new Button(Translation.Get("posePane", "saveButton"));
             this.savePoseButton.ControlEvent += OnSavePose;
 
-            this.deletePoseButton = new Button(Translation.Get("posePane", "deleteButton"));
             this.categoryComboBox = new ComboBox(Constants.CustomPoseGroupList.ToArray());
             this.poseNameTextField = new TextField();
             this.poseNameTextField.ControlEvent += OnSavePose;
@@ -39,11 +37,12 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             this.categoryHeader = Translation.Get("posePane", "categoryHeader");
             this.nameHeader = Translation.Get("posePane", "nameHeader");
             this.savePoseButton.Label = Translation.Get("posePane", "saveButton");
-            this.deletePoseButton.Label = Translation.Get("posePane", "deleteButton");
         }
 
         public override void Draw()
         {
+            GUI.enabled = this.meidoManager.HasActiveMeido;
+
             MiscGUI.Header(categoryHeader);
             this.categoryComboBox.Draw(GUILayout.Width(160f));
 
@@ -52,6 +51,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             this.poseNameTextField.Draw(GUILayout.Width(160f));
             this.savePoseButton.Draw(GUILayout.ExpandWidth(false));
             GUILayout.EndHorizontal();
+
+            GUI.enabled = true;
         }
 
         private void OnSavePose(object sender, EventArgs args)