coldcoldfix
This commit is contained in:
@@ -130,7 +130,13 @@ public class EventPoint : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (RectTransformUtility.RectangleContainsScreenPoint(CurveCanvas.GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
public void SelectButtonClick()//unity内:当按钮按下时
|
||||
{
|
||||
if (Keyboard.current.leftShiftKey.isPressed)
|
||||
@@ -173,8 +179,6 @@ public class EventPoint : MonoBehaviour
|
||||
// 如果有已连接点,则重置其颜色
|
||||
if (FatherTab.FatherWindow.ConnectedPoint != null)
|
||||
{
|
||||
FatherTab.TabButton.onClick.RemoveAllListeners();
|
||||
FatherTab.TabButton.onClick.AddListener(FatherTab.AddEvent);
|
||||
FatherTab.FatherWindow.EvEndpointChangeButton.GetComponent<Image>().color = new Color(1f, 1f, 1f, 1);
|
||||
|
||||
FatherTab.FatherWindow.ConnectedPoint.EvDrawimage.color = new Color(
|
||||
|
||||
@@ -24,6 +24,7 @@ public class FlexibleFloatTab : MonoBehaviour
|
||||
public FlexibleFloat connectFloat;
|
||||
public int BeatDeviver => FatherWindow.BeatDeviver;
|
||||
public int BeatNextDeviver => FatherWindow.BeatNextDeviver;
|
||||
public bool linked = false;//TODOTODO!
|
||||
|
||||
// 初始化函数
|
||||
public void Initialize(FlexibleFloat flexibleFloat, string title)
|
||||
@@ -36,7 +37,6 @@ public class FlexibleFloatTab : MonoBehaviour
|
||||
CreateBeatLines();
|
||||
CreateEventPoints();
|
||||
Area.localPosition = new Vector3(FatherWindow.songBeat * BeatDeviver, 0, 0);
|
||||
TabButton.onClick.AddListener(AddEvent);
|
||||
}
|
||||
|
||||
// 清除子节点
|
||||
@@ -91,6 +91,12 @@ public class FlexibleFloatTab : MonoBehaviour
|
||||
// 更新函数
|
||||
public void Update()
|
||||
{
|
||||
bool isOnEv = false;
|
||||
foreach (var i in eventPoints)
|
||||
{
|
||||
isOnEv = RectTransformUtility.RectangleContainsScreenPoint(i.selectButton.GetComponent<RectTransform>(), Mouse.current.position.ReadValue());
|
||||
if (isOnEv) break;
|
||||
}
|
||||
Vector3 newPosition = new Vector3(-FatherWindow.songBeat * BeatDeviver, 0, 0);
|
||||
Area.localPosition = newPosition;
|
||||
BeatArea.localPosition = newPosition;
|
||||
@@ -103,11 +109,17 @@ public class FlexibleFloatTab : MonoBehaviour
|
||||
}
|
||||
}
|
||||
XBeatArea.localPosition = BeatArea.localPosition;
|
||||
if (RectTransformUtility.RectangleContainsScreenPoint(TabButton.GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
|
||||
if (!isOnEv && Mouse.current.leftButton.wasPressedThisFrame)
|
||||
{
|
||||
AddEvent();
|
||||
}
|
||||
}
|
||||
|
||||
// 添加事件
|
||||
public void AddEvent()
|
||||
{
|
||||
|
||||
if (Keyboard.current.ctrlKey.isPressed)
|
||||
{
|
||||
EventPoint eventPoint = Instantiate(this.eventPoint, Area);
|
||||
@@ -115,17 +127,17 @@ public class FlexibleFloatTab : MonoBehaviour
|
||||
eventPoint.Initialize(new AnimatedFloat(GetBeat(),
|
||||
GetBeat() + (float.Parse(FatherWindow.EventMultiplier.text) * FatherWindow.timePerBeat), 0, 0, AnimationCurveType.Linear));
|
||||
eventPoints.Insert(FindInsertIndex(eventPoint.animatedFloat.startTime), eventPoint);
|
||||
LinkNewEventPoint(eventPoint, true);
|
||||
LinkNewEventPoint(eventPoint, linked);
|
||||
eventPoint.ReDraw(scalevalue);
|
||||
eventPoint.selectButton.onClick.Invoke();
|
||||
FatherWindow.ChangeValue();
|
||||
connectFloat.Add(eventPoint.animatedFloat);
|
||||
connectFloat.Sort();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FatherWindow.ConnectedPoint != null) FatherWindow.ConnectedPoint.UpLoad();
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// if (FatherWindow.ConnectedPoint != null) FatherWindow.ConnectedPoint.UpLoad();
|
||||
// }
|
||||
}
|
||||
public void SpawnEvent(AnimatedFloat animatedFloat)
|
||||
{
|
||||
|
||||
@@ -187,7 +187,6 @@ public partial class GraphicalFlexibleFloatWindow
|
||||
}
|
||||
|
||||
ConnectedPoint.FatherTab.TabButton.onClick.RemoveAllListeners();
|
||||
ConnectedPoint.FatherTab.TabButton.onClick.AddListener(ConnectedPoint.FatherTab.AddEvent);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ public class SampleWindow : MovableWindow//该window高度为300,横的要在1
|
||||
TransformChanged();
|
||||
windowRect.GetComponent<CanvasGroup>().alpha = track.timeDurationSubmodule.CheckTimeInDuration(songTime) ? 1f : 0.2f;
|
||||
}
|
||||
if (selectedGameObject is null && RectTransformUtility.RectangleContainsScreenPoint(windowRect, Mouse.current.position.ReadValue()))
|
||||
if (selectedGameObject.GetType() != typeof(TMP_InputField) && RectTransformUtility.RectangleContainsScreenPoint(windowRect, Mouse.current.position.ReadValue()))
|
||||
{
|
||||
DetectNote();
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni.RhythmGame;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
@@ -12,12 +13,18 @@ namespace Ichni.Editor
|
||||
{
|
||||
public partial class InputListener : MonoBehaviour
|
||||
{
|
||||
public static InputListener instance;
|
||||
private PointerEventData pointerEventData;
|
||||
private bool isPointerOverUI;
|
||||
private GameObject hoveredUI;
|
||||
public TMP_Text hoveredUIText;
|
||||
public GameObject hoveredUI;
|
||||
public EventSystem eventSystem;
|
||||
public List<GraphicRaycaster> graphicRaycasters;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform;
|
||||
@@ -37,6 +44,8 @@ namespace Ichni.Editor
|
||||
SwitchCameraOperation();
|
||||
ClickSelectElement();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user