37 lines
930 B
C#
37 lines
930 B
C#
using asap.core;
|
|
using GameCore;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class SettingNotificationsPopupPanel : MonoBehaviour
|
|
{
|
|
public Button btn_ok;
|
|
public Button btn_cancel;
|
|
private ILocalNotificationService notifications;
|
|
private void Start()
|
|
{
|
|
notifications = GContext.container.Resolve<ILocalNotificationService>();
|
|
btn_ok.onClick.AddListener(OnBtnOk);
|
|
btn_cancel.onClick.AddListener(DestroyUI);
|
|
}
|
|
private void OnBtnOk()
|
|
{
|
|
if (this == null)
|
|
{
|
|
return;
|
|
}
|
|
(notifications as LocalNotificationService)?.RequirePromptOwner();
|
|
DestroyUI();
|
|
notifications.OpenSettings();
|
|
}
|
|
void DestroyUI()
|
|
{
|
|
if (this == null)
|
|
{
|
|
return;
|
|
}
|
|
(notifications as LocalNotificationService)?.RequirePromptOwner();
|
|
UIManager.Instance.DestroyUI(gameObject.name);
|
|
}
|
|
}
|