12345678910111213141516171819202122 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- using TMPro;
- using Sirenix.OdinInspector;
- namespace KairoEngine.UI.InteractionHandler
- {
- [HideMonoScript]
- public class ButtonData : MonoBehaviour
- {
- public TextMeshProUGUI headerComponent;
- public Image graphicComponent;
- public void Setup(string text, Sprite graphic = null)
- {
- if(headerComponent != null && !string.IsNullOrEmpty(text)) headerComponent.text = text;
- if(graphic != null && graphicComponent != null) graphicComponent.sprite = graphic;
- }
- }
- }
|