瀏覽代碼

Add drawing with GUI.Toggle by providing Rect

Very niche usage but required to draw maid edit toggle in a certain way.
habeebweeb 4 年之前
父節點
當前提交
ba48a94960
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Controls/Toggle.cs

+ 6 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/GUI/Controls/Toggle.cs

@@ -34,5 +34,11 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             bool value = GUILayout.Toggle(Value, Label, toggleStyle, layoutOptions);
             if (value != Value) Value = value;
         }
+
+        public void Draw(Rect rect)
+        {
+            bool value = GUI.Toggle(rect, Value, Label);
+            if (value != Value) Value = value;
+        }
     }
 }