|
@@ -221,11 +221,11 @@ namespace GFGGame
|
|
|
return "png";
|
|
|
}
|
|
|
|
|
|
- public static void SetItemNumAndNeedNum(GObject obj, int itemId, int needNum, string color = "#D27869")
|
|
|
+ public static void SetItemNumAndNeedNum(GObject obj, int itemId, int needNum)
|
|
|
{
|
|
|
UI_ComCostCurrencyWithHas com = UI_ComCostCurrencyWithHas.Proxy(obj);
|
|
|
int hasNum = ItemDataManager.GetItemNum(itemId);
|
|
|
- string strHasNum = StringUtil.GetColorText(hasNum.ToString(), hasNum < needNum ? color : "#FFFFFF"); hasNum.ToString();
|
|
|
+ string strHasNum = StringUtil.GetColorText(hasNum.ToString(), hasNum < needNum ? "#D0A09B" : "#8E7C6B"); hasNum.ToString();
|
|
|
// com.m_txtNeed.text = needNum.ToString();
|
|
|
com.m_txtCount.text = string.Format("{0}/{1}", strHasNum, needNum);
|
|
|
ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(itemId);
|
|
@@ -235,7 +235,10 @@ namespace GFGGame
|
|
|
public static void SetItemNeedNum(GObject obj, int itemId, int needNum)
|
|
|
{
|
|
|
UI_ComCostCurrency com = UI_ComCostCurrency.Proxy(obj);
|
|
|
- com.m_txtNeed.text = needNum.ToString();
|
|
|
+ int hasNum = ItemDataManager.GetItemNum(itemId);
|
|
|
+ string strNeedNum = StringUtil.GetColorText(needNum.ToString(), hasNum < needNum ? "#D0A09B" : "#8E7C6B"); needNum.ToString();
|
|
|
+ com.m_txtNeed.text = strNeedNum;
|
|
|
+
|
|
|
|
|
|
ItemCfg cfg = ItemCfgArray.Instance.GetCfg(itemId);
|
|
|
com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg.res);
|