mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-12-10 05:59:15 +00:00
early return for Chart Editor handleCursor()
This commit is contained in:
parent
a3b7891b42
commit
6334215be4
|
|
@ -4467,8 +4467,17 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
|
|
||||||
// TODO: TBH some of this should be using FlxMouseEventManager...
|
// TODO: TBH some of this should be using FlxMouseEventManager...
|
||||||
|
|
||||||
if (shouldHandleCursor)
|
// early return if we shouldn't handle the cursor at all
|
||||||
|
if (!shouldHandleCursor)
|
||||||
{
|
{
|
||||||
|
if (gridGhostNote != null) gridGhostNote.visible = false;
|
||||||
|
if (gridGhostHoldNote != null) gridGhostHoldNote.visible = false;
|
||||||
|
if (gridGhostEvent != null) gridGhostEvent.visible = false;
|
||||||
|
|
||||||
|
// Do not set Cursor.cursorMode here, because it will be set by the HaxeUI.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Over the course of this big conditional block,
|
// Over the course of this big conditional block,
|
||||||
// we determine what the cursor should look like,
|
// we determine what the cursor should look like,
|
||||||
// and fall back to the default cursor if none of the conditions are met.
|
// and fall back to the default cursor if none of the conditions are met.
|
||||||
|
|
@ -5417,15 +5426,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
// Actually set the cursor mode to the one we specified earlier.
|
// Actually set the cursor mode to the one we specified earlier.
|
||||||
Cursor.cursorMode = targetCursorMode ?? Default;
|
Cursor.cursorMode = targetCursorMode ?? Default;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (gridGhostNote != null) gridGhostNote.visible = false;
|
|
||||||
if (gridGhostHoldNote != null) gridGhostHoldNote.visible = false;
|
|
||||||
if (gridGhostEvent != null) gridGhostEvent.visible = false;
|
|
||||||
|
|
||||||
// Do not set Cursor.cursorMode here, because it will be set by the HaxeUI.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleToolboxes():Void
|
function handleToolboxes():Void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue