重构代码

This commit is contained in:
monitor1394
2020-05-17 20:36:14 +08:00
parent bc5bd1214e
commit f23347a86e
62 changed files with 1021 additions and 1030 deletions

View File

@@ -0,0 +1,34 @@
/******************************************/
/* */
/* Copyright (c) 2018 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/******************************************/
using UnityEngine;
using UnityEngine.UI;
namespace XCharts
{
internal static class TitleHelper
{
public static Font GetTextFont(Title title, ThemeInfo themeInfo)
{
return (title.textStyle.font != null) ? title.textStyle.font : themeInfo.font;
}
public static Color GetTextColor(Title title, ThemeInfo themeInfo)
{
return !ChartHelper.IsClearColor(title.textStyle.color) ? title.textStyle.color : (Color)themeInfo.titleTextColor;
}
public static Font GetSubTextFont(Title title, ThemeInfo themeInfo)
{
return (title.subTextStyle.font != null) ? title.subTextStyle.font : themeInfo.font;
}
public static Color GetSubTextColor(Title title, ThemeInfo themeInfo)
{
return !ChartHelper.IsClearColor(title.subTextStyle.color) ? title.subTextStyle.color : (Color)themeInfo.titleSubTextColor;
}
}
}