27 lines
610 B
C#
27 lines
610 B
C#
using UnityEngine.UIElements;
|
|
|
|
namespace LiveOpsExamples
|
|
{
|
|
public class ShopOfferRowView
|
|
{
|
|
private readonly Label _nameLabel;
|
|
private readonly Label _priceLabel;
|
|
private readonly Button _buyButton;
|
|
|
|
public Button BuyButton => _buyButton;
|
|
|
|
public ShopOfferRowView(VisualElement root)
|
|
{
|
|
_nameLabel = root.Q<Label>("offer-name");
|
|
_priceLabel = root.Q<Label>("offer-price");
|
|
_buyButton = root.Q<Button>("offer-buy-button");
|
|
}
|
|
|
|
public void Set(string offerName, string price)
|
|
{
|
|
_nameLabel.text = offerName;
|
|
_priceLabel.text = price;
|
|
}
|
|
}
|
|
}
|