coldcoldfix

This commit is contained in:
2025-06-21 22:28:23 +08:00
parent e1a6269353
commit 56cd335eb2
8 changed files with 37180 additions and 38354 deletions

View File

@@ -105,7 +105,6 @@ MonoBehaviour:
type: 3} type: 3}
TabButton: {fileID: 7072696198344783471} TabButton: {fileID: 7072696198344783471}
Title: Title:
FirstBeatLine: {fileID: 0}
connectFloat: connectFloat:
value: 0 value: 0
currentAnimationIndex: 0 currentAnimationIndex: 0

File diff suppressed because one or more lines are too long

View File

@@ -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内当按钮按下时 public void SelectButtonClick()//unity内当按钮按下时
{ {
if (Keyboard.current.leftShiftKey.isPressed) if (Keyboard.current.leftShiftKey.isPressed)
@@ -173,8 +179,6 @@ public class EventPoint : MonoBehaviour
// 如果有已连接点,则重置其颜色 // 如果有已连接点,则重置其颜色
if (FatherTab.FatherWindow.ConnectedPoint != null) 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.EvEndpointChangeButton.GetComponent<Image>().color = new Color(1f, 1f, 1f, 1);
FatherTab.FatherWindow.ConnectedPoint.EvDrawimage.color = new Color( FatherTab.FatherWindow.ConnectedPoint.EvDrawimage.color = new Color(

View File

@@ -24,6 +24,7 @@ public class FlexibleFloatTab : MonoBehaviour
public FlexibleFloat connectFloat; public FlexibleFloat connectFloat;
public int BeatDeviver => FatherWindow.BeatDeviver; public int BeatDeviver => FatherWindow.BeatDeviver;
public int BeatNextDeviver => FatherWindow.BeatNextDeviver; public int BeatNextDeviver => FatherWindow.BeatNextDeviver;
public bool linked = false;//TODOTODO!
// 初始化函数 // 初始化函数
public void Initialize(FlexibleFloat flexibleFloat, string title) public void Initialize(FlexibleFloat flexibleFloat, string title)
@@ -36,7 +37,6 @@ public class FlexibleFloatTab : MonoBehaviour
CreateBeatLines(); CreateBeatLines();
CreateEventPoints(); CreateEventPoints();
Area.localPosition = new Vector3(FatherWindow.songBeat * BeatDeviver, 0, 0); Area.localPosition = new Vector3(FatherWindow.songBeat * BeatDeviver, 0, 0);
TabButton.onClick.AddListener(AddEvent);
} }
// 清除子节点 // 清除子节点
@@ -91,6 +91,12 @@ public class FlexibleFloatTab : MonoBehaviour
// 更新函数 // 更新函数
public void Update() 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); Vector3 newPosition = new Vector3(-FatherWindow.songBeat * BeatDeviver, 0, 0);
Area.localPosition = newPosition; Area.localPosition = newPosition;
BeatArea.localPosition = newPosition; BeatArea.localPosition = newPosition;
@@ -103,11 +109,17 @@ public class FlexibleFloatTab : MonoBehaviour
} }
} }
XBeatArea.localPosition = BeatArea.localPosition; XBeatArea.localPosition = BeatArea.localPosition;
if (RectTransformUtility.RectangleContainsScreenPoint(TabButton.GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
if (!isOnEv && Mouse.current.leftButton.wasPressedThisFrame)
{
AddEvent();
}
} }
// 添加事件 // 添加事件
public void AddEvent() public void AddEvent()
{ {
if (Keyboard.current.ctrlKey.isPressed) if (Keyboard.current.ctrlKey.isPressed)
{ {
EventPoint eventPoint = Instantiate(this.eventPoint, Area); EventPoint eventPoint = Instantiate(this.eventPoint, Area);
@@ -115,17 +127,17 @@ public class FlexibleFloatTab : MonoBehaviour
eventPoint.Initialize(new AnimatedFloat(GetBeat(), eventPoint.Initialize(new AnimatedFloat(GetBeat(),
GetBeat() + (float.Parse(FatherWindow.EventMultiplier.text) * FatherWindow.timePerBeat), 0, 0, AnimationCurveType.Linear)); GetBeat() + (float.Parse(FatherWindow.EventMultiplier.text) * FatherWindow.timePerBeat), 0, 0, AnimationCurveType.Linear));
eventPoints.Insert(FindInsertIndex(eventPoint.animatedFloat.startTime), eventPoint); eventPoints.Insert(FindInsertIndex(eventPoint.animatedFloat.startTime), eventPoint);
LinkNewEventPoint(eventPoint, true); LinkNewEventPoint(eventPoint, linked);
eventPoint.ReDraw(scalevalue); eventPoint.ReDraw(scalevalue);
eventPoint.selectButton.onClick.Invoke(); eventPoint.selectButton.onClick.Invoke();
FatherWindow.ChangeValue(); FatherWindow.ChangeValue();
connectFloat.Add(eventPoint.animatedFloat); connectFloat.Add(eventPoint.animatedFloat);
connectFloat.Sort(); connectFloat.Sort();
} }
else // else
{ // {
if (FatherWindow.ConnectedPoint != null) FatherWindow.ConnectedPoint.UpLoad(); // if (FatherWindow.ConnectedPoint != null) FatherWindow.ConnectedPoint.UpLoad();
} // }
} }
public void SpawnEvent(AnimatedFloat animatedFloat) public void SpawnEvent(AnimatedFloat animatedFloat)
{ {

View File

@@ -187,7 +187,6 @@ public partial class GraphicalFlexibleFloatWindow
} }
ConnectedPoint.FatherTab.TabButton.onClick.RemoveAllListeners(); ConnectedPoint.FatherTab.TabButton.onClick.RemoveAllListeners();
ConnectedPoint.FatherTab.TabButton.onClick.AddListener(ConnectedPoint.FatherTab.AddEvent);
} }
} }

View File

@@ -147,7 +147,7 @@ public class SampleWindow : MovableWindow//该window高度为300横的要在1
TransformChanged(); TransformChanged();
windowRect.GetComponent<CanvasGroup>().alpha = track.timeDurationSubmodule.CheckTimeInDuration(songTime) ? 1f : 0.2f; 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(); DetectNote();

View File

@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Ichni.RhythmGame; using Ichni.RhythmGame;
using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.InputSystem; using UnityEngine.InputSystem;
@@ -12,12 +13,18 @@ namespace Ichni.Editor
{ {
public partial class InputListener : MonoBehaviour public partial class InputListener : MonoBehaviour
{ {
public static InputListener instance;
private PointerEventData pointerEventData; private PointerEventData pointerEventData;
private bool isPointerOverUI; private bool isPointerOverUI;
private GameObject hoveredUI; public TMP_Text hoveredUIText;
public GameObject hoveredUI;
public EventSystem eventSystem; public EventSystem eventSystem;
public List<GraphicRaycaster> graphicRaycasters; public List<GraphicRaycaster> graphicRaycasters;
private void Awake()
{
instance = this;
}
private void Start() private void Start()
{ {
sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform; sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform;
@@ -37,6 +44,8 @@ namespace Ichni.Editor
SwitchCameraOperation(); SwitchCameraOperation();
ClickSelectElement(); ClickSelectElement();
} }
} }

File diff suppressed because it is too large Load Diff