-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b849633
commit f1a1483
Showing
18 changed files
with
348 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/************************************************/ | ||
/* */ | ||
/* Copyright (c) 2018 - 2021 monitor1394 */ | ||
/* https://github.com/monitor1394 */ | ||
/* */ | ||
/************************************************/ | ||
|
||
using System.Collections.Generic; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace XCharts | ||
{ | ||
public class PraseJsonDataEditor : EditorWindow | ||
{ | ||
public static BaseChart chart; | ||
public static int serieIndex; | ||
private static PraseJsonDataEditor window; | ||
private string inputJsonText = ""; | ||
|
||
public static void ShowWindow() | ||
{ | ||
window = GetWindow<PraseJsonDataEditor>(); | ||
window.titleContent = new GUIContent("PraseJsonData"); | ||
window.minSize = new Vector2(450, 550); | ||
window.Focus(); | ||
window.Show(); | ||
} | ||
|
||
void OnInspectorUpdate() | ||
{ | ||
Repaint(); | ||
} | ||
|
||
private void OnGUI() | ||
{ | ||
if (chart == null) | ||
{ | ||
Close(); | ||
return; | ||
} | ||
EditorGUILayout.LabelField("Input json data, or echarts serie data:"); | ||
inputJsonText = EditorGUILayout.TextArea(inputJsonText, GUILayout.Height(400)); | ||
if (GUILayout.Button("Add")) | ||
{ | ||
var serie = chart.series.GetSerie(serieIndex); | ||
if (serie != null) | ||
{ | ||
serie.ParseJsonData(inputJsonText); | ||
} | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.