PlantList
This commit is contained in:
1 parent
ba49ef5015
commit
7c207ef5b9
44 files changed
+2795
-1147
No files matched your search
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using Code.Calendar.DataStructures;
|
||||
using Code.Infrastructure.UI;
|
||||
using PrimeTween;
|
||||
using Reflex.Attributes;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.Calendar.Panels
|
||||
{
|
||||
public class TaskAddPanel : UIPanel
|
||||
{
|
||||
[Inject] private ITaskService _taskService;
|
||||
[SerializeField] private TMP_InputField taskName;
|
||||
[SerializeField] private Toggle isPeriodic;
|
||||
|
||||
public void TryAddPlant()
|
||||
{
|
||||
Task newTask = new()
|
||||
{
|
||||
Active = true,
|
||||
IsPeriodic = isPeriodic.isOn,
|
||||
PeriodicInterval = 0,
|
||||
};
|
||||
_taskService.AddTask(newTask);
|
||||
}
|
||||
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
// Tween.Alpha(image, 1f, 1f).OnComplete(target: this, _ => callback?.Invoke());
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
// Tween.Alpha(image, 0f, 1f).OnComplete(target: this, _ => callback?.Invoke());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user