示例#1
0
    public static void xDrawTitleBar(string title, float barDx = 0f)
    {
        var r = GUILayoutUtility.GetRect(0, Screen.width, 20f, 20f);
        var c = new ColorHSL(0f, 0f, 0.5f).xProSkinAdjust();

        GUI.DrawTexture(r.dx(barDx), c.xGetTexture2D());
        GUI.Label(r.dy(2f), title, EditorStyles.boldLabel);
        //temp = EditorGUILayout.Slider(temp, -1f, 1f);
    }
示例#2
0
    public static void xDrawTitleBar(string title, ref bool enable, float barDx = 0f, float toggleDx = 0f)
    {
        var r = GUILayoutUtility.GetRect(0, Screen.width, 20f, 20f);
        var c = new ColorHSL(0f, 0f, 0.5f).xProSkinAdjust();

        GUI.DrawTexture(r.dx(barDx), c.xGetTexture2D());

        var r2 = r.dy(2f);

        GUI.Label(r2, title, EditorStyles.boldLabel);
        enable = GUI.Toggle(r2.xSubRectRight(20f).dx(toggleDx), enable, "");
    }