2026-04-25 18:20:16 +07:00
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UIElements;
|
2026-04-28 00:07:42 +07:00
|
|
|
using System.Threading.Tasks;
|
2026-04-25 18:20:16 +07:00
|
|
|
|
2026-04-28 00:07:42 +07:00
|
|
|
namespace Hallucinate.UI
|
2026-04-25 18:20:16 +07:00
|
|
|
{
|
2026-04-28 00:07:42 +07:00
|
|
|
public class ProfileController : BaseUIController
|
2026-04-25 18:20:16 +07:00
|
|
|
{
|
2026-04-28 00:07:42 +07:00
|
|
|
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 += () => uiManager.Pop();
|
|
|
|
|
|
|
|
|
|
LoadProfileData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void LoadProfileData()
|
2026-04-25 18:20:16 +07:00
|
|
|
{
|
2026-04-28 00:07:42 +07:00
|
|
|
// Dummy data for now
|
|
|
|
|
_username.text = "GamerPro_2026";
|
|
|
|
|
_rank.text = "DIAMOND II";
|
|
|
|
|
_winRateBar.value = 72;
|
|
|
|
|
_winRateText.text = "72%";
|
2026-04-25 18:20:16 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|