graph chart引入&骑行结果弹窗
This commit is contained in:
1 parent
40d118cea3
commit
96f3644b5b
2374 files changed
+485161
-2410
No files matched your search
@@ -0,0 +1,48 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
partial class InfoBox
|
||||
{
|
||||
public CandleChart[] CandleChart;
|
||||
void CandleClicked(CandleChart.CandleEventArgs args)
|
||||
{
|
||||
if (args.IsBodyEvent)
|
||||
infoText.text = string.Format("{0} : Candle Body Clicked , O:{1},C:{2}", args.Category, args.CandleValue.Open, args.CandleValue.Close);
|
||||
if (args.IsHighEvent)
|
||||
infoText.text = string.Format("{0} : Candle High Clicked , H:{1}", args.Category, args.CandleValue.High);
|
||||
if (args.IsLowEvent)
|
||||
infoText.text = string.Format("{0} : Candle Low Clicked , L:{1}", args.Category, args.CandleValue.Low);
|
||||
}
|
||||
|
||||
void CandleHovered(CandleChart.CandleEventArgs args)
|
||||
{
|
||||
if (args.IsBodyEvent)
|
||||
infoText.text = string.Format("{0} : Candle Body , O:{1},C:{2}", args.Category, args.CandleValue.Open, args.CandleValue.Close);
|
||||
if (args.IsHighEvent)
|
||||
infoText.text = string.Format("{0} : Candle High , H:{1}", args.Category, args.CandleValue.High);
|
||||
if (args.IsLowEvent)
|
||||
infoText.text = string.Format("{0} : Candle Low , L:{1}", args.Category, args.CandleValue.Low);
|
||||
}
|
||||
|
||||
partial void HookCandle()
|
||||
{
|
||||
|
||||
if (CandleChart != null)
|
||||
{
|
||||
foreach (CandleChart candle in CandleChart)
|
||||
{
|
||||
if (candle == null)
|
||||
return;
|
||||
candle.CandleHovered.AddListener(CandleHovered);
|
||||
candle.CandleClicked.AddListener(CandleClicked);
|
||||
candle.NonHovered.AddListener(NonHovered);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user