架构大更
This commit is contained in:
@@ -1,26 +1,28 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Michsky.MUIP
|
||||
{
|
||||
[CustomEditor(typeof(UIGradient))]
|
||||
public class UIGradientEditor : Editor
|
||||
{
|
||||
private GUISkin customSkin;
|
||||
private int currentTab;
|
||||
private GUISkin customSkin;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (EditorGUIUtility.isProSkin == true) { customSkin = MUIPEditorHandler.GetDarkEditor(customSkin); }
|
||||
else { customSkin = MUIPEditorHandler.GetLightEditor(customSkin); }
|
||||
if (EditorGUIUtility.isProSkin)
|
||||
customSkin = MUIPEditorHandler.GetDarkEditor(customSkin);
|
||||
else
|
||||
customSkin = MUIPEditorHandler.GetLightEditor(customSkin);
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
MUIPEditorHandler.DrawComponentHeader(customSkin, "Gradient Top Header");
|
||||
|
||||
GUIContent[] toolbarTabs = new GUIContent[1];
|
||||
var toolbarTabs = new GUIContent[1];
|
||||
toolbarTabs[0] = new GUIContent("Settings");
|
||||
|
||||
currentTab = MUIPEditorHandler.DrawTabs(currentTab, toolbarTabs, customSkin);
|
||||
@@ -44,11 +46,12 @@ namespace Michsky.MUIP
|
||||
MUIPEditorHandler.DrawPropertyCW(_gradientType, customSkin, "Type", 100);
|
||||
MUIPEditorHandler.DrawPropertyCW(_offset, customSkin, "Offset", 100);
|
||||
MUIPEditorHandler.DrawPropertyCW(_zoom, customSkin, "Zoom", 100);
|
||||
_modifyVertices.boolValue = MUIPEditorHandler.DrawToggle(_modifyVertices.boolValue, customSkin, "Complex Gradient");
|
||||
_modifyVertices.boolValue =
|
||||
MUIPEditorHandler.DrawToggle(_modifyVertices.boolValue, customSkin, "Complex Gradient");
|
||||
break;
|
||||
}
|
||||
|
||||
if (Application.isPlaying == false) { this.Repaint(); }
|
||||
if (!Application.isPlaying) Repaint();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user