| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEngine; |
| | 4 | | using UnityEngine.UI; |
| | 5 | | using TMPro; |
| | 6 | |
|
| | 7 | | namespace DCL.Social.Passports |
| | 8 | | { |
| | 9 | | public class PassportNavigationComponentView : BaseComponentView, IPassportNavigationComponentView |
| | 10 | | { |
| | 11 | | private const string GUEST_TEXT = "is a guest"; |
| | 12 | |
|
| | 13 | | [SerializeField] private GameObject aboutPanel; |
| | 14 | | [SerializeField] private GameObject wearablesPanel; |
| | 15 | | [SerializeField] private GameObject guestPanel; |
| | 16 | | [SerializeField] private GameObject normalPanel; |
| | 17 | | [SerializeField] private TextMeshProUGUI usernameText; |
| | 18 | |
|
| | 19 | | public void SetGuestUser(bool isGuest) |
| | 20 | | { |
| 0 | 21 | | guestPanel.SetActive(isGuest); |
| 0 | 22 | | normalPanel.SetActive(!isGuest); |
| 0 | 23 | | } |
| | 24 | |
|
| | 25 | | public void SetName(string username) |
| | 26 | | { |
| 0 | 27 | | usernameText.text = $"{username} {GUEST_TEXT}"; |
| 0 | 28 | | } |
| | 29 | |
|
| | 30 | | private void EnableAboutPanel() |
| | 31 | | { |
| 0 | 32 | | wearablesPanel.SetActive(false); |
| 0 | 33 | | aboutPanel.SetActive(true); |
| 0 | 34 | | } |
| | 35 | |
|
| | 36 | | private void EnableWearablesPanel() |
| | 37 | | { |
| 0 | 38 | | aboutPanel.SetActive(false); |
| 0 | 39 | | wearablesPanel.SetActive(true); |
| 0 | 40 | | } |
| | 41 | |
|
| | 42 | | public override void RefreshControl() |
| | 43 | | { |
| 0 | 44 | | } |
| | 45 | |
|
| | 46 | | } |
| | 47 | | } |