Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user