using PixelCrushers.QuestMachine; using System; using Beyond; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; using Action = System.Action; namespace Beyond { public class GuiltSlot : MonoBehaviour, IPointerEnterHandler { public Image image, backgroundImage; [SerializeField] private Image disagreedMarker; public TMP_Text title; public int count = 1; public string id; public string descriptionOffenceCategory, descriptionChargedWith, descriptionPenaltyConsequences, descriptionPlaceOfCrime; public Action Clicked; public bool disagreed = false; public void OnPointerEnter(PointerEventData eventData) { Clicked?.Invoke(); } public void SetAsSelected() { title.color = bItemSlot.GetSelectedButtonTextColor(); backgroundImage.color = bItemSlot.GetSelectedImageColor(); image.color = backgroundImage.color; } public void SetAsDeselected() { title.color = bItemSlot.GetDefaultButtonTextColor(); backgroundImage.color = bItemSlot.GetDeselectedImageColor(); image.color = backgroundImage.color; } public void SetAsDisagreedOn() { disagreed = true; disagreedMarker.enabled = true; } } }