Browse Source

Make struct members get only properties

habeebweeb 4 years ago
parent
commit
75c474f19e

+ 3 - 3
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Controls/Slider.cs

@@ -94,9 +94,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
     public struct SliderProp
     {
-        public float Left { get; private set; }
-        public float Right { get; private set; }
-        public float Initial { get; private set; }
+        public float Left { get; }
+        public float Right { get; }
+        public float Initial { get; }
 
         public SliderProp(float left, float right, float initial = 0f)
         {

+ 13 - 4
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/DragPointManager.cs

@@ -738,10 +738,11 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
         private struct DragInfo
         {
-            public Bone Bone { get; private set; }
-            public bool GizmoActive { get; private set; }
-            public bool DragPointActive { get; private set; }
-            public bool DragPointVisible { get; private set; }
+            public Bone Bone { get; }
+            public bool GizmoActive { get; }
+            public bool DragPointActive { get; }
+            public bool DragPointVisible { get; }
+
             public DragInfo(Bone bone, bool gizmoActive, bool dragPointActive, bool dragPointVisible)
             {
                 this.Bone = bone;
@@ -749,18 +750,26 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
                 this.DragPointActive = dragPointActive;
                 this.DragPointVisible = dragPointVisible;
             }
+
             public static DragInfo Gizmo(Bone bone)
             {
                 return new DragInfo(bone, true, false, false);
             }
+
             public static DragInfo Drag(Bone bone)
             {
                 return new DragInfo(bone, false, true, false);
             }
+
             public static DragInfo DragBone(Bone bone)
             {
                 return new DragInfo(bone, false, true, true);
             }
+
+            public static DragInfo DragAll(Bone bone)
+            {
+                return new DragInfo(bone, true, true, true);
+            }
         }
     }
 }

+ 4 - 4
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/EnvironmentManager.cs

@@ -154,10 +154,10 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
     public struct CameraInfo
     {
-        public Vector3 TargetPos { get; private set; }
-        public Vector3 Pos { get; private set; }
-        public Vector3 Angle { get; private set; }
-        public float Distance { get; private set; }
+        public Vector3 TargetPos { get; }
+        public Vector3 Pos { get; }
+        public Vector3 Angle { get; }
+        public float Distance { get; }
         public CameraInfo(CameraMain camera)
         {
             this.TargetPos = camera.GetTargetPos();