HeavenStudioPlus/Assets/Scripts/LevelEditor/SnapDialog/SnapChangeButton.cs

23 lines
551 B
C#
Raw Normal View History

2022-02-25 04:30:02 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
2022-03-14 14:21:05 +00:00
namespace HeavenStudio.Editor
2022-02-25 04:30:02 +00:00
{
2022-07-04 15:29:19 +00:00
public class SnapChangeButton : Button, IPointerDownHandler
2022-02-25 04:30:02 +00:00
{
2022-07-04 15:29:19 +00:00
public SnapDialog SnapDialog;
public bool isDown;
2022-02-25 04:30:02 +00:00
public override void OnPointerDown(PointerEventData eventData)
{
if (eventData.button == PointerEventData.InputButton.Left)
{
2022-07-04 15:29:19 +00:00
SnapDialog.ChangeCommon(isDown);
2022-02-25 04:30:02 +00:00
}
}
}
}