void DrawInfoCardInstalled(Texture texture, string version)
 {
     DoozyEditorUtility.DrawTexture(texture, 208, 32);
     GUILayout.Space(-16);
     EditorGUILayout.BeginHorizontal();
     {
         GUILayout.Space(76);
         EditorGUILayout.LabelField(version, skin.GetStyle(DoozyStyle.StyleName.Version.ToString()), GUILayout.Width(104));
         GUILayout.FlexibleSpace();
     }
     EditorGUILayout.EndHorizontal();
     GUILayout.Space(-4);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Draws DISABLED or ENABLED textures for the target component depending on the isEnabled bool value.
 /// </summary>
 public void DrawInfoBar(bool isEnabled, bool showEnabledState = true)
 {
     SaveCurrentColorsAndResetColors();
     if (isEnabled)
     {
         if (showEnabledState)
         {
             DoozyEditorUtility.DrawTexture(DoozyResources.InfoBarEnabled, WIDTH_1, 18f);
         }
     }
     else
     {
         DoozyEditorUtility.DrawTexture(DoozyResources.InfoBarDisabled, WIDTH_1, 18f);
     }
     LoadPreviousColors();
 }
 void DrawInfoCardNotInstalled(Texture texture, string url = "")
 {
     EditorGUILayout.BeginVertical();
     {
         DoozyEditorUtility.DrawTexture(texture, 208, 32);
         if (!string.IsNullOrEmpty(url))
         {
             EditorGUILayout.BeginHorizontal();
             {
                 GUILayout.FlexibleSpace();
                 if (GUILayout.Button("Download", skin.GetStyle(DoozyStyle.StyleName.BtnGreyDark.ToString()), GUILayout.Width(200)))
                 {
                     Application.OpenURL(url);
                     //Application.OpenURL("http://unity3d.com/");
                 }
                 GUILayout.FlexibleSpace();
             }
             EditorGUILayout.EndHorizontal();
         }
     }
     EditorGUILayout.EndVertical();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Adds a title and a remove component button.
 /// </summary>
 public void DrawTitleAndRemoveButton(string title, Object obj = null)
 {
     SaveCurrentColorsAndResetColors();
     DoozyEditorUtility.DrawTexture(DoozyResources.HeaderBarSubtitle, WIDTH_1, 18f);
     GUILayout.Space(-18f);
     GUILayout.BeginHorizontal(GUILayout.Width(WIDTH_1));
     {
         GUILayout.Space(44f);
         EditorGUILayout.LabelField(title, skin.GetStyle(DoozyStyle.StyleName.HeaderSubtitle.ToString()), GUILayout.Width(WIDTH_3 * 2 - 48));
         if (GUILayout.Button("REMOVE COMPONENT", skin.GetStyle(DoozyStyle.StyleName.BtnRed.ToString()), GUILayout.Width(WIDTH_3)))
         {
             if (obj != null)
             {
                 if (EditorUtility.DisplayDialog("REMOVE COMPONENT", "Are you sure you want to remove this component?\nThis action will delete the component and it cannot be undone.", "Yes", "Cancel"))
                 {
                     RemoveComponent(obj);
                 }
             }
         }
     }
     GUILayout.EndHorizontal();
     LoadPreviousColors();
 }
Exemplo n.º 5
0
 public void SetBackgroundTexture(Texture texture, float width, float height)
 {
     DoozyEditorUtility.DrawTexture(texture, width, height);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Draws the component's header.
 /// </summary>
 public void DrawHeader(Texture texture, float width = HEADER_WIDTH, float height = HEADER_HEIGHT)
 {
     SaveCurrentColorsAndResetColors();
     DoozyEditorUtility.DrawTexture(texture, width, height);
     LoadPreviousColors();
 }