This commit is contained in:
lunarcleint
2023-07-14 17:38:46 -07:00
parent 65f6b53d6a
commit 2633b51626
2 changed files with 10 additions and 4 deletions
@@ -262,11 +262,14 @@ class CharacterEditor extends UIState {
var pos = FlxG.mouse.getScreenPosition(charCamera);
pos *= camDragSpeed;
nextScroll.set((camDrag.x - pos.x), (camDrag.y - pos.y));
}
currentCursor = HAND;
} else
currentCursor = ARROW;
charCamera.scroll.set(
lerp(charCamera.scroll.x, nextScroll.x, 0.25),
lerp(charCamera.scroll.y, nextScroll.y, 0.25)
lerp(charCamera.scroll.x, nextScroll.x, 0.35),
lerp(charCamera.scroll.y, nextScroll.y, 0.35)
);
charCamera.zoom = lerp(charCamera.zoom, __camZoom, 0.125);
+4 -1
View File
@@ -8,6 +8,7 @@ import funkin.editors.ui.UIContextMenu.UIContextMenuCallback;
import openfl.ui.Mouse;
import funkin.editors.ui.UIContextMenu.UIContextMenuOption;
import flixel.math.FlxPoint;
import openfl.ui.MouseCursor;
import flixel.math.FlxRect;
class UIState extends MusicBeatState {
@@ -20,6 +21,8 @@ class UIState extends MusicBeatState {
public var hoveredSprite:UISprite = null;
public var currentFocus:IUIFocusable = null;
public var currentCursor:MouseCursor = ARROW;
private var __rect:FlxRect;
private var __mousePos:FlxPoint;
@@ -105,7 +108,7 @@ class UIState extends MusicBeatState {
Mouse.cursor = hoveredSprite.cursor;
hoveredSprite = null;
} else {
Mouse.cursor = ARROW;
Mouse.cursor = currentCursor;
}
}