From bb463ef0b13236738a1da9cd04f57def3e7e2c7c Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 29 八月 2025 15:21:51 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/Utility/UIHelper.cs |   84 +++++++++++++++++++++++-------------------
 1 files changed, 46 insertions(+), 38 deletions(-)

diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index f28674e..2f6bf80 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -69,20 +69,28 @@
     public static void SetIconWithMoneyType(this Image _image, int moneyType)
     {
         if (_image == null) return;
-        string iconKey = StringUtility.Contact("Money_Type_", moneyType);
-        _image.SetSprite(iconKey);
-    }
-
-    public static void SetSmallIconWithMoneyType(this Image _image, int moneyType)
-    {
-        if (_image == null) return;
-        string iconKey = StringUtility.Contact("SmallMoney", moneyType);
-        _image.SetSprite(iconKey);
+        // string iconKey = StringUtility.Contact("Money_Type_", moneyType);
+        if (GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType))
+        {
+            _image.SetOrgSprite(ItemConfig.Get(GeneralDefine.MoneyDisplayModel[moneyType]).IconKey);
+        }
+        else
+        { 
+            Debug.LogError("MoneyDisplayModel 涓洪厤缃揣甯佺被鍨嬶細" + moneyType);
+        }
     }
 
     public static string GetIconNameWithMoneyType(int moneyType)
     {
-        return StringUtility.Contact("Money_Type_", moneyType);
+        if (GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType))
+        {
+            return ItemConfig.Get(GeneralDefine.MoneyDisplayModel[moneyType]).IconKey;
+        }
+        else
+        {
+            Debug.LogError("MoneyDisplayModel 涓洪厤缃揣甯佺被鍨嬶細" + moneyType);
+            return "";
+        }
     }
 
     /// <summary>
@@ -364,7 +372,7 @@
     public static readonly Color s_NavyYellow = new Color32(242, 238, 2, 255); //f2ee02
     public static readonly Color s_LightGreen = new Color32(42, 227, 55, 255);//2ae337
     public static readonly Color s_LightWhite = new Color32(245, 246, 230, 255); //f5f6e6
-    public static readonly Color s_Gray = new Color32(132, 121, 123, 255);  //84797b
+    public static readonly Color s_Gray = new Color32(104, 104, 104,255);  //bbbbbb
     public static readonly Color s_Gold = new Color32(255, 239, 71, 255);//ffef47
     public static readonly Color s_EarthYellow = new Color32(248, 152, 59, 255);//f8983b
 
@@ -707,7 +715,7 @@
             case TextColType.LightGreen:
                 return StringUtility.Contact("<color=#8ddc11>", msg, "</color>");
             case TextColType.Gray:
-                return StringUtility.Contact("<color=#84797b>", msg, "</color>");
+                return StringUtility.Contact("<color=#bbbbbb>", msg, "</color>");
             case TextColType.lightYellow:
                 return StringUtility.Contact("<color=#fcedb9>", msg, "</color>");
             case TextColType.NavyYellow:
@@ -761,7 +769,7 @@
         {
             return string.Empty;
         }
-        return GetRealmColorByLv(realmLv, config.Name, bright);
+        return AppendColor(realmLv, config.Name, bright);
     }
 
     //strFormat闄勫姞 澧冪晫鍚嶄互澶栫殑鏂囧瓧
@@ -780,31 +788,31 @@
     //     return GetRealmColorByLv(realmLv, string.Format(strFormat, config.Name), bright);
     // }
 
-    public static string GetRealmColorByLv(int realmLv, string msg, bool bright = true)
-    {
-        var config = RealmConfig.Get(realmLv);
-        if (config == null)
-        {
-            return string.Empty;
-        }
-        switch (config.Quality)
-        {
-            case 1:
-                return StringUtility.Contact("<color=#", bright ? "666666" : "dddddd", ">", msg, "</color>");
-            case 2:
-                return StringUtility.Contact("<color=#", bright ? "00b337" : "66ff00", ">", msg, "</color>");
-            case 3:
-                return StringUtility.Contact("<color=#", bright ? "0066ff" : "00c6ff", ">", msg, "</color>");
-            case 4:
-                return StringUtility.Contact("<color=#", bright ? "ff00f6" : "f000ff", ">", msg, "</color>");
-            case 5:
-                return StringUtility.Contact("<color=#", bright ? "ff6600" : "ff9000", ">", msg, "</color>");
-            case 6:
-                return StringUtility.Contact("<color=#", bright ? "ff0000" : "ff0000", ">", msg, "</color>");
-            default:
-                return msg;
-        }
-    }
+    // public static string GetRealmColorByLv(int realmLv, string msg, bool bright = true)
+    // {
+    //     var config = RealmConfig.Get(realmLv);
+    //     if (config == null)
+    //     {
+    //         return string.Empty;
+    //     }
+    //     switch (config.Quality)
+    //     {
+    //         case 1:
+    //             return StringUtility.Contact("<color=#", bright ? "666666" : "dddddd", ">", msg, "</color>");
+    //         case 2:
+    //             return StringUtility.Contact("<color=#", bright ? "00b337" : "66ff00", ">", msg, "</color>");
+    //         case 3:
+    //             return StringUtility.Contact("<color=#", bright ? "0066ff" : "00c6ff", ">", msg, "</color>");
+    //         case 4:
+    //             return StringUtility.Contact("<color=#", bright ? "ff00f6" : "f000ff", ">", msg, "</color>");
+    //         case 5:
+    //             return StringUtility.Contact("<color=#", bright ? "ff6600" : "ff9000", ">", msg, "</color>");
+    //         case 6:
+    //             return StringUtility.Contact("<color=#", bright ? "ff0000" : "ff0000", ">", msg, "</color>");
+    //         default:
+    //             return msg;
+    //     }
+    // }
 
     //鐗╁搧 鍚勫姛鑳藉搧璐�  浠庣簿鑹�1鍝佽川 瀵瑰簲 3寮�濮�
     /// <summary>

--
Gitblit v1.8.0