Files
Studio/Assets/NewStudioPGD/Scripts/UI/Element/UI_AuthenticationItem.cs

36 lines
972 B
C#
Raw Normal View History

2025-05-08 16:29:30 +09:00
using System;
2025-05-08 15:38:46 +09:00
using System.Collections.Generic;
2025-05-08 16:29:30 +09:00
using System.Linq;
2025-05-08 15:38:46 +09:00
using TMPro;
using UnityEngine.UI;
using XRLib.UI;
2025-05-20 16:25:58 +09:00
namespace Studio.UI
2025-05-08 15:38:46 +09:00
{
public class UI_AuthenticationItem : UIBase
{
public TMP_InputField InputField;
public TMP_Dropdown Dropdown;
public Button Button_Remove;
2025-05-08 16:29:30 +09:00
public enum EType
{
String,
Int,
Boolean,
}
2025-05-08 15:38:46 +09:00
private void Awake()
{
InputField = transform.Find(nameof(InputField)).GetComponent<TMP_InputField>();
Dropdown = transform.Find (nameof(Dropdown)).GetComponent<TMP_Dropdown>();
Button_Remove = transform.Find(nameof(Button_Remove)).GetComponent<Button>();
2025-05-08 16:29:30 +09:00
Button_Remove.onClick.AddListener(() => Destroy(gameObject));
2025-05-08 15:38:46 +09:00
2025-05-08 16:29:30 +09:00
List<string> options = Enum.GetNames(typeof(EType)).ToList();
2025-05-08 15:38:46 +09:00
Dropdown.ClearOptions();
Dropdown.AddOptions(options);
}
}
}