Beispiel #1
0
    private void OnEnable()
    {
        target = (GUISkin)base.target;

        properties = new Properties(serializedObject);

        faders = new Faders(this);

        buttonEditor = new GUIStyleEditor(target, target.button);

        MakeStyleList();

        selectedStyle = EditorPrefs.GetInt("guiskineditor.editingStyle", 0);

        if (selectedStyle > styleEditors.Count - 1)
        {
            selectedStyle = 0;
            EditorPrefs.SetInt("guiskineditor.editingStyle", selectedStyle);
        }

        //var type = typeof( GUIUtility );
        //var method = type.GetMethod( "GetDefaultSkin", BindingFlags.Static | BindingFlags.NonPublic, null, new Type[] { }, null );
        //var defaultSkin = (GUISkin)method.Invoke( null, null );

        //Debug.Log( defaultSkin.font );
    }
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (styleDrawer == null)
         styleDrawer = new GUIStyleEditor(toolbar.style, "ToolBar Style");
     insFold = FormatInspectorHeadGUI(insFold, "ToolBar Element", null, ContentGUI);
 }
Beispiel #3
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (btnStyleDrawer == null)
     {
         btnStyleDrawer = new GUIStyleEditor(ele.btnStyle, "ButtonStyle");
     }
     insFold = FormatInspectorHeadGUI(insFold, "Button", null, ContentGUI);
 }
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (imageStyleDrawer == null)
     {
         imageStyleDrawer = new GUIStyleEditor(image.imageStyle, "Image Style");
     }
     insFold = FormatInspectorHeadGUI(insFold, "Image Element", null, ContentGUI);
 }
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (textStyleDrawer == null)
     {
         textStyleDrawer = new GUIStyleEditor(textElement.textStyle, "Text Style");
     }
     insFold = FormatInspectorHeadGUI(insFold, "Text Element", null, ContentGUI);
 }
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (sliderDrawer == null)
     {
         sliderDrawer = new GUIStyleEditor(slider.slider, "Slider Style");
     }
     if (thumbDrawer == null)
     {
         thumbDrawer = new GUIStyleEditor(slider.thumb, "Thumb Style");
     }
     insFold = FormatInspectorHeadGUI(insFold, "Slider", null, ContentGUI);
 }
Beispiel #7
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (HstyleDrawer == null)
     {
         HstyleDrawer = new GUIStyleEditor(ele.Hstyle, "Hrizontal Style");
     }
     if (VstyleDrawer == null)
     {
         VstyleDrawer = new GUIStyleEditor(ele.Vstyle, "Vertical Style");
     }
     insFold = FormatInspectorHeadGUI(insFold, "ScrollView", null, ContentGUI);
 }