// ===========================================================
    // Methods for/from SuperClass/Interfaces
    // ===========================================================

    // ===========================================================
    // Methods
    // ===========================================================
    
    void OnGUI() {
        MadGUI.Message("Here you can create backgrounds for your level screens. Draggable is optional, "
            + "but necessary if you want to setup follow animations.", MessageType.None);
        panel = (MadPanel) EditorGUILayout.ObjectField("Panel", panel, typeof(MadPanel), true);
        objectName = EditorGUILayout.TextField("Object Name", objectName);
        draggable = (MadDraggable) EditorGUILayout.ObjectField("Draggable", draggable, typeof(MadDraggable), true);
        
        bool valid = panel != null && !string.IsNullOrEmpty(objectName);
        GUI.enabled = valid;
        if (GUILayout.Button("Create")) {
            Create();
        }
        GUI.enabled = true;
    }
示例#2
0
    // ===========================================================
    // Methods for/from SuperClass/Interfaces
    // ===========================================================

    // ===========================================================
    // Methods
    // ===========================================================

    void OnGUI()
    {
        MadGUI.Message("Here you can create backgrounds for your level screens. Draggable is optional, "
                       + "but necessary if you want to setup follow animations.", MessageType.None);
        panel      = (MadPanel)EditorGUILayout.ObjectField("Panel", panel, typeof(MadPanel), true);
        objectName = EditorGUILayout.TextField("Object Name", objectName);
        draggable  = (MadDraggable)EditorGUILayout.ObjectField("Draggable", draggable, typeof(MadDraggable), true);

        bool valid = panel != null && !string.IsNullOrEmpty(objectName);

        GUI.enabled = valid;
        if (GUILayout.Button("Create"))
        {
            Create();
        }
        GUI.enabled = true;
    }