|
@@ -221,13 +221,14 @@ namespace GFGGame
|
|
return "png";
|
|
return "png";
|
|
}
|
|
}
|
|
|
|
|
|
- public static void SetItemNumAndNeedNum(GObject obj, int itemId, int needNum)
|
|
|
|
|
|
+ public static void SetItemNumAndNeedNum(GObject obj, int itemId, int needNum, bool ChangeColor = false)
|
|
{
|
|
{
|
|
UI_ComCostCurrencyWithHas com = UI_ComCostCurrencyWithHas.Proxy(obj);
|
|
UI_ComCostCurrencyWithHas com = UI_ComCostCurrencyWithHas.Proxy(obj);
|
|
int hasNum = ItemDataManager.GetItemNum(itemId);
|
|
int hasNum = ItemDataManager.GetItemNum(itemId);
|
|
- string strHasNum = StringUtil.GetColorText(hasNum.ToString(), hasNum < needNum ? "#D0A09B" : "#FBC1BD"); hasNum.ToString();
|
|
|
|
|
|
+ string needStrColor = ChangeColor ? "#B99F7B" : "#FDEED4";
|
|
|
|
+ string strHasNum = StringUtil.GetColorText(hasNum.ToString(), hasNum < needNum ? "#C5645A" : needStrColor); hasNum.ToString();
|
|
// com.m_txtNeed.text = needNum.ToString();
|
|
// com.m_txtNeed.text = needNum.ToString();
|
|
- com.m_txtCount.text = string.Format("{0}/{1}", strHasNum, needNum);
|
|
|
|
|
|
+ com.m_txtCount.text = string.Format("{0}{1}{2}", strHasNum, StringUtil.GetColorText("/", needStrColor), StringUtil.GetColorText(needNum.ToString(), needStrColor));
|
|
ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(itemId);
|
|
ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(itemId);
|
|
com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
|
|
com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
|
|
|
|
|