41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class DropDownItem : MonoBehaviour
|
|
{
|
|
public Toggle m_toggle;
|
|
// Sprite m_SelectSprite;
|
|
// Sprite m_defaultSprite;
|
|
public GameObject itemBackGround;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
// m_SelectSprite = Resources.Load<Sprite>("Prefabs/RobotUI/Ñ¡ÖÐÁбí");
|
|
if (m_toggle.isOn == true)
|
|
{
|
|
itemBackGround.SetActive(true);
|
|
}
|
|
// m_defaultSprite = Resources.Load<Sprite>("Prefabs/RobotUI/¾ØÐÎ 1277");
|
|
//m_toggle.onValueChanged.AddListener((x) =>
|
|
//{
|
|
// if (x)
|
|
// {
|
|
// itemBackGround.GetComponent<Image>().sprite= m_SelectSprite;
|
|
// }
|
|
// //else
|
|
// //{
|
|
// // itemBackGround.GetComponent<Image>().sprite = m_defaultSprite;
|
|
// //}
|
|
//});
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|