using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Vanguard.UI.Overlays
{
public sealed class CardActionMenuItem
{
public CardActionMenuItem(string label, Action action, bool enabled = true)
{
Label = label;
Action = action;
Enabled = enabled;
}
public string Label { get; }
public Action Action { get; }
public bool Enabled { get; }
}
/// Экранное контекстное меню над картой.
public sealed class CardActionMenuView
{
private RectTransform _root;
private RectTransform _popup;
private Action _onClose;
public bool IsVisible => _root != null && _root.gameObject.activeSelf;
public void Build(Transform parent)
{
_root = UiKit.CreatePanel(parent, "CardActionMenu", new Color(0f, 0f, 0f, 0.01f));
var image = _root.GetComponent();
image.raycastTarget = true;
var backdrop = _root.gameObject.AddComponent