48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class HostCardRecoverTheLootInterface : HostCardInterfaceBase
|
|
{
|
|
[SerializeField] private TextMeshProUGUI _CommentUI;
|
|
|
|
private Color[] _ButtonColours;
|
|
|
|
private Color _ButtonColourEnabled = Color.white;
|
|
private Color _ButtonColourDisabled = Color.gray;
|
|
private Color _ButtonColourAlreadyChosen = Color.yellow;
|
|
|
|
|
|
public void SetComment(string Comment, Color CommentColour)
|
|
{
|
|
_CommentUI.text = Comment;
|
|
_CommentUI.color = CommentColour;
|
|
}
|
|
|
|
public void AddLandmarkName(int ButtonIndex, string LandmarkName)
|
|
{
|
|
ChoiceUI[ButtonIndex].text = LandmarkName;
|
|
}
|
|
|
|
public void DisablePanelButton(int Panel)
|
|
{
|
|
ChoiceButtons[Panel - 1].enabled = false;
|
|
ChoiceButtonImages[Panel - 1].color = _ButtonColourDisabled;
|
|
}
|
|
|
|
public void EnableAllPanelButtons(bool Enable)
|
|
{
|
|
for (int i = 0; i < ChoiceButtons.Length; i++)
|
|
{
|
|
ChoiceButtons[i].enabled = Enable;
|
|
ChoiceButtonImages[i].color = Enable ? _ButtonColourEnabled : _ButtonColourDisabled;
|
|
}
|
|
}
|
|
}
|