Files
rudder-unity-sdk/Assets/LiveOpsExamples/Scripts/UI/Rows/ShopOfferRowView.cs
T

27 lines
610 B
C#
Raw Normal View History

2026-08-12 14:03:44 +03:00
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;
}
}
}