Forráskód Böngészése

Tweak GUI

Some headers and lines have been added. Pose window panes have been
moved around.
habeebweeb 4 éve
szülő
commit
dfa8ce05f5

+ 9 - 7
COM3D2.MeidoPhotoStudio.Plugin/Config/MeidoPhotoStudio/Translations/en/translation.ui.json

@@ -70,12 +70,14 @@
         "headToCamToggle": "Head",
         "eyeToCamToggle": "Eye",
         "xSlider": "Look X",
-        "ySlider": "Look Y"
+        "ySlider": "Look Y",
+        "bindLabel": "Bind"
     },
     "attachMpnPropPane": {
         "attachButton": "Attach",
         "detachButton": "Detach",
-        "detachAllButton": "Detach All"
+        "detachAllButton": "Detach All",
+        "header": "SM Restraints"
     },
     "clothing": {
         "noCategory": " --- ",
@@ -207,8 +209,6 @@
         "blue": "Blue"
     },
     "propsPane": {
-        "props1Label": "Props 1",
-        "props2Label": "Props 2",
         "props1AddButton": "Add",
         "props2AddButton": "Add",
         "header": "Props"
@@ -225,6 +225,7 @@
         "header": "Mod Props"
     },
     "propManagerPane": {
+        "header": "Manage Props",
         "dragPointToggle": "Cube",
         "gizmoToggle": "Gizmo",
         "shadowCastingToggle": "Shadow",
@@ -250,11 +251,12 @@
         "header": "Lights",
         "add": "+",
         "delete": "Del",
-        "resetPosition": "R Pos",
-        "resetProperties": "R Props",
+        "resetPosition": "Position",
+        "resetProperties": "Properties",
         "clear": "Clear",
         "colour": "Colour",
-        "disable": "On"
+        "disable": "On",
+        "resetLabel": "Reset"
     },
     "lightType": {
         "main": "Main",

+ 6 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/BackgroundWindow2Panes/PropManagerPane.cs

@@ -13,6 +13,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         private readonly Toggle shadowCastingToggle;
         private readonly Button deletePropButton;
         private readonly Button copyPropButton;
+        private string propManagerHeader;
+
         private int CurrentDoguIndex => propManager.CurrentDoguIndex;
 
         public PropManagerPane(PropManager propManager)
@@ -72,6 +74,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
             deletePropButton = new Button(Translation.Get("propManagerPane", "deleteButton"));
             deletePropButton.ControlEvent += (s, a) => this.propManager.RemoveDogu(CurrentDoguIndex);
+
+            propManagerHeader = Translation.Get("propManagerPane", "header");
         }
 
         protected override void ReloadTranslation()
@@ -81,6 +85,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             shadowCastingToggle.Label = Translation.Get("propManagerPane", "shadowCastingToggle");
             copyPropButton.Label = Translation.Get("propManagerPane", "copyButton");
             deletePropButton.Label = Translation.Get("propManagerPane", "deleteButton");
+            propManagerHeader = Translation.Get("propManagerPane", "header");
         }
 
         public override void Draw()
@@ -97,6 +102,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
                 GUILayout.Width(dropdownButtonWidth)
             };
 
+            MpsGui.Header(propManagerHeader);
             MpsGui.WhiteLine();
 
             GUI.enabled = propManager.DoguCount > 0;

+ 1 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/BackgroundWindowPanes/EffectsPanes/EffectsPane.cs

@@ -47,6 +47,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             MpsGui.Header("Effects");
             MpsGui.WhiteLine();
             effectToggles.Draw();
+            MpsGui.BlackLine();
             currentEffectPane.Draw();
         }
     }

+ 17 - 9
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/BackgroundWindowPanes/LightsPane.cs

@@ -21,6 +21,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         private readonly Toggle disableToggle;
         private MPSLightType currentLightType;
         private string lightHeader;
+        private string resetLabel;
+
         private static readonly Dictionary<LightProp, SliderProp> LightSliderProp =
             new Dictionary<LightProp, SliderProp>()
             {
@@ -42,8 +44,6 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
         public LightsPane(LightManager lightManager)
         {
-            lightHeader = Translation.Get("lightsPane", "header");
-
             this.lightManager = lightManager;
             this.lightManager.Rotate += (s, a) => UpdateRotation();
             this.lightManager.Scale += (s, a) => UpdateScale();
@@ -95,12 +95,15 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
             resetPositionButton = new Button(Translation.Get("lightsPane", "resetPosition"));
             resetPositionButton.ControlEvent += (s, a) => ResetLightPosition();
+
+            lightHeader = Translation.Get("lightsPane", "header");
+            resetLabel = Translation.Get("lightsPane", "resetLabel");
+
         }
 
         protected override void ReloadTranslation()
         {
             updating = true;
-            lightHeader = Translation.Get("lightsPane", "header");
             lightTypeGrid.SetItems(Translation.GetArray("lightType", lightTypes));
             lightDropdown.SetDropdownItems(lightManager.LightNameList);
             deleteLightButton.Label = Translation.Get("lightsPane", "delete");
@@ -114,6 +117,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             colorToggle.Label = Translation.Get("lightsPane", "colour");
             resetPropsButton.Label = Translation.Get("lightsPane", "resetProperties");
             resetPositionButton.Label = Translation.Get("lightsPane", "resetPosition");
+            lightHeader = Translation.Get("lightsPane", "header");
+            resetLabel = Translation.Get("lightsPane", "resetLabel");
             updating = false;
         }
 
@@ -233,24 +238,26 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         {
             bool isMain = lightManager.SelectedLightIndex == 0;
 
+            GUILayoutOption noExpandWidth = GUILayout.ExpandWidth(false);
+
             MpsGui.Header(lightHeader);
             MpsGui.WhiteLine();
 
             GUILayout.BeginHorizontal();
             lightDropdown.Draw(GUILayout.Width(84));
-            addLightButton.Draw(GUILayout.ExpandWidth(false));
+            addLightButton.Draw(noExpandWidth);
 
             GUILayout.FlexibleSpace();
             GUI.enabled = !isMain;
-            deleteLightButton.Draw(GUILayout.ExpandWidth(false));
+            deleteLightButton.Draw(noExpandWidth);
             GUI.enabled = true;
-            clearLightsButton.Draw(GUILayout.ExpandWidth(false));
+            clearLightsButton.Draw(noExpandWidth);
             GUILayout.EndHorizontal();
 
             bool isDisabled = !isMain && lightManager.CurrentLight.IsDisabled;
             GUILayout.BeginHorizontal();
             GUI.enabled = !isDisabled;
-            lightTypeGrid.Draw(GUILayout.ExpandWidth(false));
+            lightTypeGrid.Draw(noExpandWidth);
             if (!isMain)
             {
                 GUI.enabled = true;
@@ -297,8 +304,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             GUILayout.EndHorizontal();
 
             GUILayout.BeginHorizontal();
-            resetPropsButton.Draw(GUILayout.ExpandWidth(false));
-            resetPositionButton.Draw(GUILayout.ExpandWidth(false));
+            GUILayout.Label(resetLabel, noExpandWidth);
+            resetPropsButton.Draw(noExpandWidth);
+            resetPositionButton.Draw(noExpandWidth);
             GUILayout.EndHorizontal();
 
             GUI.enabled = true;

+ 8 - 10
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/MainWindowPanes/PoseWindowPane.cs

@@ -20,8 +20,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         private readonly Toggle savePoseToggle;
         private readonly Toggle saveHandToggle;
         private readonly Button flipButton;
-        private bool savePoseMode = false;
-        private bool saveHandMode = false;
+        private bool savePoseMode;
+        private bool saveHandMode;
         private string handPresetHeader;
         private string flipIKHeader;
 
@@ -82,6 +82,10 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             maidSwitcherPane.Draw();
             maidPosePane.Draw();
 
+            maidIKPane.Draw();
+
+            MpsGui.WhiteLine();
+
             scrollPos = GUILayout.BeginScrollView(scrollPos);
 
             GUI.enabled = meidoManager.HasActiveMeido;
@@ -98,14 +102,6 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
             maidDressingPane.Draw();
 
-            MpsGui.WhiteLine();
-
-            maidIKPane.Draw();
-
-            MpsGui.WhiteLine();
-
-            gravityControlPane.Draw();
-
             GUI.enabled = meidoManager.HasActiveMeido;
             MpsGui.Header(handPresetHeader);
             MpsGui.WhiteLine();
@@ -115,6 +111,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             if (saveHandMode) saveHandPane.Draw();
             else handPresetPane.Draw();
 
+            gravityControlPane.Draw();
+
             copyPosePane.Draw();
 
             GUILayout.BeginHorizontal();

+ 4 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/PoseWindowPanes/GravityControlPane.cs

@@ -28,6 +28,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             bool enabled = meidoManager.HasActiveMeido;
             GUI.enabled = enabled;
 
+            MpsGui.Header("Gravity Control");
+            MpsGui.WhiteLine();
+
             Meido meido = meidoManager.ActiveMeido;
             GUILayout.BeginHorizontal();
 
@@ -37,9 +40,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             GUI.enabled = enabled && meido.SkirtGravityValid;
             skirtToggle.Draw();
 
-            GUI.enabled = true;
             GUILayout.EndHorizontal();
 
+            GUI.enabled = enabled;
             globalToggle.Draw();
 
             GUI.enabled = true;

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

@@ -9,6 +9,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         private readonly Slider lookYSlider;
         private readonly Toggle headToCamToggle;
         private readonly Toggle eyeToCamToggle;
+        private string bindLabel;
 
         public MaidFaceLookPane(MeidoManager meidoManager)
         {
@@ -24,6 +25,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
             eyeToCamToggle = new Toggle(Translation.Get("freeLookPane", "eyeToCamToggle"));
             eyeToCamToggle.ControlEvent += (s, a) => SetHeadToCam(eyeToCamToggle.Value, eye: true);
+
+            bindLabel = Translation.Get("freeLookPane", "bindLabel");
         }
 
         protected override void ReloadTranslation()
@@ -32,6 +35,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             lookYSlider.Label = Translation.Get("freeLookPane", "ySlider");
             headToCamToggle.Label = Translation.Get("freeLookPane", "headToCamToggle");
             eyeToCamToggle.Label = Translation.Get("freeLookPane", "eyeToCamToggle");
+            bindLabel = Translation.Get("freeLookPane", "bindLabel");
         }
 
         public void SetHeadToCam(bool value, bool eye = false)
@@ -87,6 +91,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             GUI.enabled = meidoManager.HasActiveMeido;
 
             GUILayout.BeginHorizontal();
+            GUILayout.Label(bindLabel, GUILayout.ExpandWidth(false));
             eyeToCamToggle.Draw();
             headToCamToggle.Draw();
             GUILayout.EndHorizontal();

+ 7 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Panes/PoseWindowPanes/MpnAttachPropPane.cs

@@ -13,6 +13,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         private readonly Button attachPropButton;
         private readonly Button detachPropButton;
         private readonly Button detachAllButton;
+        private string header;
 
         public MpnAttachPropPane(MeidoManager meidoManager)
         {
@@ -38,6 +39,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
             detachAllButton = new Button(Translation.Get("attachMpnPropPane", "detachAllButton"));
             detachAllButton.ControlEvent += (s, a) => DetachAll();
+
+            header = Translation.Get("attachMpnPropPane", "header");
         }
 
         protected override void ReloadTranslation()
@@ -45,6 +48,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             attachPropButton.Label = Translation.Get("attachMpnPropPane", "attachButton");
             detachPropButton.Label = Translation.Get("attachMpnPropPane", "detachButton");
             detachAllButton.Label = Translation.Get("attachMpnPropPane", "detachAllButton");
+            header = Translation.Get("attachMpnPropPane", "header");
             SetDropdownList();
         }
 
@@ -54,6 +58,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
             GUILayoutOption noExpand = GUILayout.ExpandWidth(false);
 
+            MpsGui.Header(header);
+            MpsGui.WhiteLine();
+
             GUILayout.BeginHorizontal();
             previousPropButton.Draw(noExpand);
             mpnAttachDropdown.Draw(GUILayout.Width(153f));