using System; using Minesweeper.Core; using Minesweeper.Config; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; namespace Minesweeper.Presentation.Views { public sealed class CellView : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerUpHandler { private const string ContentImagePath = "Content/Image"; private const string ContentLabelPath = "Content/Text (TMP)"; [SerializeField] private Button button; [SerializeField] private Image backgroundImage; [SerializeField] private Image contentImage; [SerializeField] private TMP_Text label; private int x; private int y; private bool inputEnabled = true; private bool isOpened; public event Action OpenRequested; public event Action FlagRequested; public event Action PressStarted; public event Action PressEnded; public void Bind(Button button, Image backgroundImage, Image contentImage, TMP_Text label) { this.button = button; this.backgroundImage = backgroundImage; this.contentImage = contentImage; this.label = label; } public void AutoBind() { if (button == null) { button = GetComponent