Trade Menu Spreadsheet
Implemented generic spreadsheet component for the Trade menu with sortable and resizable data columns
This commit is contained in:
parent
e3de7158fd
commit
8036585ebc
46 changed files with 21429 additions and 17151 deletions
32
Assets/HoverCursorChange.cs
Normal file
32
Assets/HoverCursorChange.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class HoverCursorChange : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
public RectTransform CursorObject;
|
||||
private bool _active;
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
CursorObject.gameObject.SetActive(true);
|
||||
_active = true;
|
||||
Cursor.visible = false;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (_active)
|
||||
CursorObject.anchoredPosition = Mouse.current.position.ReadValue();
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
Cursor.visible = true;
|
||||
_active = false;
|
||||
CursorObject.gameObject.SetActive(false);
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue