From 398a4ad10f9bb357ab14db2bd28196c8fe016e07 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期四, 27 十二月 2018 16:11:47 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Utility/UIHelper.cs | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/Utility/UIHelper.cs b/Utility/UIHelper.cs
index 501710d..7f81046 100644
--- a/Utility/UIHelper.cs
+++ b/Utility/UIHelper.cs
@@ -432,6 +432,48 @@
public static readonly Color s_LightYellow = new Color32(255, 244, 205, 255); //fff4cd
public static readonly Color s_Gray = new Color32(204, 204, 204, 255);
+ public static readonly Color s_BrightDanLV0 = new Color32(102,102,102,255); //666666
+ public static readonly Color s_BrightDanLV1 = new Color32(148, 96, 255, 255); //9460ff
+ public static readonly Color s_BrightDanLV2 = new Color32(0, 102, 255, 255); //0066ff
+ public static readonly Color s_BrightDanLV3 = new Color32(0, 179, 55, 255); //00b337
+ public static readonly Color s_BrightDanLV4 = new Color32(255, 102, 0, 255); //ff6600
+ public static readonly Color s_BrightDanLV5 = new Color32(255, 0, 0, 255); //ff0000
+ public static readonly Color s_BrightDanLV6 = new Color32(255, 0, 246, 255); //ff00f6
+
+ public static readonly Color s_GrayDanLV0 = new Color32(221,221, 221, 255); //dddddd
+ public static readonly Color s_GrayDanLV1 = new Color32(121,153, 255, 255); //7999ff
+ public static readonly Color s_GrayDanLV2 = new Color32(0, 198, 255, 255); //00c6ff
+ public static readonly Color s_GrayDanLV3 = new Color32(102, 255, 0, 255); //66ff00
+ public static readonly Color s_GrayDanLV4 = new Color32(255, 144, 0, 255); //ff9000
+ public static readonly Color s_GrayDanLV5 = new Color32(255, 0, 0, 255); //ff0000
+ public static readonly Color s_GrayDanLV6 = new Color32(240, 0, 255, 255); //f000ff
+
+ public static Color GetDanLVColor(int danLv,bool bright = false)
+ {
+ var crossDanLVConfig = Config.Instance.Get<CrossServerArenaConfig>(danLv);
+ if(crossDanLVConfig != null)
+ {
+ switch (crossDanLVConfig.DanType)
+ {
+ case 0:
+ return bright ? s_BrightDanLV0 : s_GrayDanLV0;
+ case 1:
+ return bright ? s_BrightDanLV1 : s_GrayDanLV1;
+ case 2:
+ return bright ? s_BrightDanLV2 : s_GrayDanLV2;
+ case 3:
+ return bright ? s_BrightDanLV3 : s_GrayDanLV3;
+ case 4:
+ return bright ? s_BrightDanLV4 : s_GrayDanLV4;
+ case 5:
+ return bright ? s_BrightDanLV5 : s_GrayDanLV5;
+ case 6:
+ return bright ? s_BrightDanLV6 : s_GrayDanLV6;
+ }
+ }
+ return Color.white;
+ }
+
public static Color GetUIColor(int itemColor, bool bright = false)
{
switch (itemColor)
@@ -490,6 +532,7 @@
}
return bright ? s_BrightWhiteColor : s_DarkWhiteColor;
}
+
private static Regex m_TextColorRegex = new Regex("<color=#[0-9a-zA-Z]+>(.*)</color>", RegexOptions.Singleline);
public static string AppendStringColor(TextColType type, string msg, bool bright = false)
--
Gitblit v1.8.0