lcy
7 天以前 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4
Main/Utility/UIHelper.cs
@@ -100,6 +100,20 @@
        }
    }
    // 通过货币类型获取物品ID
    public static int GetItemIDWithMoneyType(int moneyType)
    {
        if (GeneralDefine.MoneyDisplayModel.ContainsKey(moneyType))
        {
            return GeneralDefine.MoneyDisplayModel[moneyType];
        }
        else
        {
            Debug.LogError("MoneyDisplayModel 未配置货币类型:" + moneyType);
            return 0;
        }
    }
    /// <summary>
    /// 分离字符串插入空格
    /// </summary>
@@ -1156,7 +1170,7 @@
    }
    //显示数量, 格式n/m, 足够绿色不足红色
    public static string ShowUseMoney(int moneyType, long useCnt, bool showLargeNum = true)
    public static string ShowUseMoney(int moneyType, long useCnt, bool showLargeNum = false)
    {
        long cnt = GetMoneyCnt(moneyType);
        if (showLargeNum)
@@ -1165,7 +1179,7 @@
            return AppendColor(useCnt <= cnt ? TextColType.Green : TextColType.Red, $"{cnt}/{useCnt}");
    }
    public static string ShowUseItem(PackType type, int itemId, long useCnt, bool showLargeNum = true)
    public static string ShowUseItem(PackType type, int itemId, long useCnt, bool showLargeNum = false)
    {
        long cnt = PackManager.Instance.GetItemCountByID(type, itemId);
        if (showLargeNum)