mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 13:30:10 +00:00
增加SerieData的自定义图标相关配置支持
This commit is contained in:
@@ -191,6 +191,16 @@ namespace XCharts
|
||||
return tooltipObj;
|
||||
}
|
||||
|
||||
public static GameObject AddIcon(string name,Transform parent,float width,float height){
|
||||
var anchorMax = new Vector2(0.5f, 0.5f);
|
||||
var anchorMin = new Vector2(0.5f, 0.5f);
|
||||
var pivot = new Vector2(0.5f, 0.5f);
|
||||
var sizeDelta = new Vector2(width, height);
|
||||
GameObject iconObj = AddObject(name, parent, anchorMin, anchorMax, pivot, sizeDelta);
|
||||
GetOrAddComponent<Image>(iconObj);
|
||||
return iconObj;
|
||||
}
|
||||
|
||||
public static GameObject AddSerieLabel(string name, Transform parent, Font font, Color textColor, Color backgroundColor,
|
||||
int fontSize, FontStyle fontStyle, float rotate, float width, float height)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user