Files
BABA_YAGA/Assets/Scripts/UI/ProfileController.cs
2026-04-29 01:04:28 +07:00

38 lines
1.0 KiB
C#

using UnityEngine;
using UnityEngine.UIElements;
using System.Threading.Tasks;
namespace Hallucinate.UI
{
public class ProfileController : BaseUIController
{
private Label _username;
private Label _rank;
private ProgressBar _winRateBar;
private Label _winRateText;
public override void Initialize(VisualElement uxmlRoot, UIManager manager)
{
base.Initialize(uxmlRoot, manager);
_username = root.Q<Label>("Username");
_rank = root.Q<Label>("Rank");
_winRateBar = root.Q<ProgressBar>("WinRateBar");
_winRateText = root.Q<Label>("WinRateText");
root.Q<Button>("BackBtn").clicked += async () => await uiManager.Pop();
LoadProfileData();
}
private void LoadProfileData()
{
// Dummy data for now
_username.text = "GamerPro_2026";
_rank.text = "DIAMOND II";
_winRateBar.value = 72;
_winRateText.text = "72%";
}
}
}