ImportBtn.cs 659 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using UnityEngine;
  5. using UnityEngine.UI;
  6. public class ImportBtn : MonoBehaviour
  7. {
  8. public Button button;
  9. public Image image;
  10. public Image arrow;
  11. public Text text;
  12. public XHGKLayerData data1;
  13. void Start()
  14. {
  15. }
  16. public void OnInit(XHGKLayerData data)
  17. {
  18. text.text = data.title;
  19. data1 = data;
  20. }
  21. public void OnActive(bool active) {
  22. image.color = active ? Color.white : Color.clear;
  23. arrow.gameObject.SetActive(active);
  24. }
  25. // Update is called once per frame
  26. void Update()
  27. {
  28. }
  29. }