34 lines
862 B
C#
34 lines
862 B
C#
using Code.Infrastructure.UI;
|
|
using Reflex.Attributes;
|
|
using UnityEngine;
|
|
using UnityEngine.UIElements;
|
|
|
|
namespace Code.Calendar.Panels
|
|
{
|
|
public class PlantAddButton : MonoBehaviour, IUIPanelLoaded
|
|
{
|
|
[Inject] private IUIService _uiService;
|
|
[SerializeField] private Button button;
|
|
|
|
public void SummonPlantAddMenu()
|
|
{
|
|
_uiService.TryLoadCreatePanel(UIPanelType.PlantAdd);
|
|
|
|
button.SetEnabled(false);
|
|
}
|
|
|
|
public void UISinglePanelLoaded(UIPanelType uiPanelType)
|
|
{
|
|
if (uiPanelType != UIPanelType.PlantAdd) return;
|
|
|
|
_uiService.OpenPanel(uiPanelType);
|
|
|
|
button.SetEnabled(true);
|
|
}
|
|
|
|
public void UIMultiplePanelLoaded(UIPanelType uiPanelType, UIPanel panel)
|
|
{
|
|
|
|
}
|
|
}
|
|
} |