Universally challenged added

This commit is contained in:
2025-12-05 21:57:51 +00:00
parent 7a0fbeed7e
commit d2c18d2264
340 changed files with 109977 additions and 1616 deletions

View File

@@ -0,0 +1,46 @@

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class UCQuestionListItem : UdonSharpBehaviour
{
public UCController controller;
public UCQuestion questionData;
public UnityEngine.UI.Image backgroundImage;
public TMPro.TextMeshProUGUI textComponent;
public void Initialize(UCQuestion question)
{
questionData = question;
if (backgroundImage == null)
{
backgroundImage = GetComponent<UnityEngine.UI.Image>();
}
if (textComponent == null)
{
textComponent = GetComponentInChildren<TMPro.TextMeshProUGUI>();
}
if (textComponent != null && questionData != null)
{
textComponent.text = questionData.mainQuestion;
}
}
public void OnItemClicked()
{
if (controller != null && questionData != null)
{
controller.ChangeQuestionPanel(questionData);
if (backgroundImage != null)
{
backgroundImage.color = Color.gray; // Example of changing background color on click
}
}
}
}