| | 1 | | using TMPro; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.UI; |
| | 4 | |
|
| | 5 | | namespace DCL.ContentModeration |
| | 6 | | { |
| | 7 | | public class ContentModerationReportingOptionComponentView : BaseComponentView |
| | 8 | | { |
| | 9 | | [SerializeField] private Button optionButton; |
| | 10 | | [SerializeField] private TMP_Text optionText; |
| | 11 | | [SerializeField] private Image optionBackground; |
| | 12 | | [SerializeField] internal Color backgroundUnselectedColor; |
| | 13 | | [SerializeField] internal Color textUnselectedColor; |
| | 14 | | [SerializeField] internal Color backgroundSelectedColor; |
| | 15 | | [SerializeField] internal Color textSelectedColor; |
| | 16 | |
|
| 0 | 17 | | public Button OptionButton => optionButton; |
| | 18 | |
|
| 0 | 19 | | public override void RefreshControl() { } |
| | 20 | |
|
| | 21 | | public void SetOptionText(string text) => |
| 0 | 22 | | optionText.text = text; |
| | 23 | |
|
| | 24 | | public void SelectOption() |
| | 25 | | { |
| 0 | 26 | | optionBackground.color = backgroundSelectedColor; |
| 0 | 27 | | optionText.color = textSelectedColor; |
| 0 | 28 | | } |
| | 29 | |
|
| | 30 | | public void UnselectOption() |
| | 31 | | { |
| 0 | 32 | | optionBackground.color = backgroundUnselectedColor; |
| 0 | 33 | | optionText.color = textUnselectedColor; |
| 0 | 34 | | } |
| | 35 | |
|
| | 36 | | public void SetActive(bool isActive) => |
| 0 | 37 | | gameObject.SetActive(isActive); |
| | 38 | | } |
| | 39 | | } |