update DialogNPCShop

This commit is contained in:
VuNgocHaiC7
2026-04-06 15:37:22 +07:00
parent b75d0a6932
commit 586df104ae
2 changed files with 22 additions and 7 deletions
@@ -29,6 +29,7 @@ public class NPCShopUIManager : AUIDialog
[Header("Texts")]
public TextMeshProUGUI itemDetailNameText;
public TextMeshProUGUI itemMoneyText;
public TextOutlet itemDescriptionText;
public TextMeshProUGUI itemsBuyAmountText;
public TextMeshProUGUI itemsBuyTotalMoneyText;
@@ -582,6 +583,15 @@ public class NPCShopUIManager : AUIDialog
itemDetailNameText.text = currentItem.name;
}
if (itemMoneyText != null)
{
uint money = GetCurrentUnitPrice();
if(money > 0)
itemMoneyText.text = $"Giá {money.ToString()} Ngân lượng";
else
itemMoneyText.text = BuyUiEmptyValue;
}
buyCount = BuyCountMin;
UpdateBuyPriceTexts();
@@ -1145,7 +1155,9 @@ public class NPCShopUIManager : AUIDialog
}
if (tmp != null)
{
tmp.text = EC_Utility.FormatForTextMeshPro(value ?? string.Empty);
string formatTextDeail = EC_Utility.FormatForTextMeshPro(value ?? string.Empty);
formatTextDeail.Replace("<color=#FFFFFF>", "<color=#FFD05D>");
tmp.text = formatTextDeail;
}
}
}
+9 -6
View File
@@ -1416,14 +1416,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.39215687}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Sprite: {fileID: 21300000, guid: ef3296c82b3934a24b288ac6309eb7a7, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
@@ -2337,6 +2337,8 @@ MonoBehaviour:
- {fileID: 9087947546155311648}
equipmentPackButtons: []
fashionPackButtons: []
tabItemButton: {fileID: 0}
tabTaskButton: {fileID: 0}
detailPanelRoot: {fileID: 1203170638860719746}
detailPanelOffset: {x: 20, y: 0}
hideDetailOnStart: 1
@@ -7119,14 +7121,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.39215687}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Sprite: {fileID: 21300000, guid: ef3296c82b3934a24b288ac6309eb7a7, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
@@ -11287,14 +11289,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.39215687}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Sprite: {fileID: 21300000, guid: ef3296c82b3934a24b288ac6309eb7a7, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
@@ -13106,6 +13108,7 @@ MonoBehaviour:
contentMidSell: {fileID: 5285943178504563476}
item_info: {fileID: 3637242207861637912}
itemDetailNameText: {fileID: 2529529646566217934}
itemMoneyText: {fileID: 2517942723267868233}
itemDescriptionText:
legacy: {fileID: 0}
tmp: {fileID: 5329995747664012504}