32 lines
670 B
C#
32 lines
670 B
C#
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class SliderHandle : MonoBehaviour
|
|
{
|
|
public bool HandleIsPressed { get; set; }
|
|
public bool IsShowing => gameObject.activeSelf;
|
|
|
|
private Image _image;
|
|
|
|
private void OnDisable()
|
|
{
|
|
HandleIsPressed = false;
|
|
}
|
|
|
|
private void Awake()
|
|
{
|
|
_image = transform.Find("BehaviourIcon").GetComponent<Image>();
|
|
}
|
|
|
|
public void SetShowState(bool isActive)
|
|
{
|
|
gameObject.SetActive(isActive);
|
|
}
|
|
|
|
public void SetHandleSprite(Sprite sprite)
|
|
{
|
|
_image.sprite = sprite;
|
|
}
|
|
} |