| | 1 | | using TMPro; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.UI; |
| | 4 | |
|
| | 5 | | namespace DCLFeatures.CameraReel.Gallery |
| | 6 | | { |
| | 7 | | public class CameraReelGalleryStorageView : MonoBehaviour, ICameraReelGalleryStorageView |
| | 8 | | { |
| | 9 | | [SerializeField] private Slider storageBar; |
| | 10 | | [SerializeField] private TMP_Text storageText; |
| | 11 | | [SerializeField] private GameObject storageFullMessage; |
| | 12 | |
|
| | 13 | | public void UpdateStorageBar(int current, int max) |
| | 14 | | { |
| 0 | 15 | | storageText.text = $"Storage: {current}/{max} photos taken"; |
| 0 | 16 | | storageText.gameObject.SetActive(true); |
| 0 | 17 | | storageFullMessage.SetActive(current >= max); |
| | 18 | |
|
| 0 | 19 | | storageBar.maxValue = max; |
| 0 | 20 | | storageBar.value = current; |
| 0 | 21 | | storageBar.gameObject.SetActive(true); |
| 0 | 22 | | } |
| | 23 | |
|
| | 24 | | public void Show() => |
| 0 | 25 | | gameObject.SetActive(true); |
| | 26 | | } |
| | 27 | | } |