Пример #1
0
 public override void OnInspectorGUI()
 {
     if (m_Target == null && target == null)
     {
         base.OnInspectorGUI();
         return;
     }
     serializedObject.Update();
     EditorGUILayout.PropertyField(m_NowVersion);
     EditorGUILayout.PropertyField(m_NewVersion);
     if (GUILayout.Button("检测更新"))
     {
         CheckVersionEditor.ShowWindow();
     }
     if (GUILayout.Button("去Github主页"))
     {
         Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
     }
     if (GUILayout.Button("点Star支持"))
     {
         Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/stargazers");
     }
     if (GUILayout.Button("问题反馈"))
     {
         Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/issues");
     }
     serializedObject.ApplyModifiedProperties();
 }
Пример #2
0
 private void CheckWarning()
 {
     if (GUILayout.Button("Remove All Chart Object"))
     {
         m_Target.RemoveChartObject();
     }
     if (GUILayout.Button("Check XCharts Update "))
     {
         CheckVersionEditor.ShowWindow();
     }
     if (m_CheckWarning)
     {
         EditorGUILayout.BeginHorizontal();
         if (GUILayout.Button("Check Warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
         if (GUILayout.Button("Hide Warning"))
         {
             m_CheckWarning = false;
         }
         EditorGUILayout.EndHorizontal();
         sb.Length = 0;
         sb.AppendFormat("version:{0}", XChartsMgr.Instance.nowVersion);
         if (!string.IsNullOrEmpty(m_Target.warningInfo))
         {
             sb.AppendLine();
             sb.Append(m_Target.warningInfo);
         }
         else
         {
             sb.AppendLine();
             sb.Append("Perfect! No warning!");
         }
         EditorGUILayout.HelpBox(sb.ToString(), MessageType.Warning);
     }
     else
     {
         if (GUILayout.Button("Check warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
     }
     EditorGUILayout.Space();
     EditorGUILayout.Space();
 }
 private void CheckWarning()
 {
     if (GUILayout.Button("Check Update "))
     {
         CheckVersionEditor.ShowWindow();
     }
     if (m_CheckWarning)
     {
         EditorGUILayout.BeginHorizontal();
         if (GUILayout.Button("Check Warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
         if (GUILayout.Button("Hide Warning"))
         {
             m_CheckWarning = false;
         }
         EditorGUILayout.EndHorizontal();
         EditorGUILayout.LabelField("version:" + XChartsMgr.Instance.nowVersion);
         if (!string.IsNullOrEmpty(m_Target.warningInfo))
         {
             var infos = m_Target.warningInfo.Split('\n');
             foreach (var info in infos)
             {
                 EditorGUILayout.LabelField(info);
             }
         }
         else
         {
             EditorGUILayout.LabelField("Perfect! No warning!");
         }
     }
     else
     {
         if (GUILayout.Button("Check warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
     }
     EditorGUILayout.Space();
     EditorGUILayout.Space();
 }