Firstborn/Assets/RPG Creation Kit/Scripts/Save System/UI/OverwriteAlertPanel.cs

35 lines
865 B
C#
Raw Permalink Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using RPGCreationKit;
using UnityEngine.EventSystems;
namespace RPGCreationKit
{
public class OverwriteAlertPanel : MonoBehaviour
{
public TextMeshProUGUI description;
public GameObject previouslySelectedObject;
public void OnConfirm()
{
if(RckInput.isUsingGamepad)
{
if(previouslySelectedObject != null)
EventSystem.current.SetSelectedGameObject(previouslySelectedObject);
}
}
public void OnCancel()
{
if (RckInput.isUsingGamepad)
{
if (previouslySelectedObject != null)
EventSystem.current.SetSelectedGameObject(previouslySelectedObject);
}
}
}
}