This commit is contained in:
Frakist
2023-08-06 12:58:11 +03:00
parent 9ed9dbf587
commit 50479e19c7
2 changed files with 2 additions and 12 deletions
@@ -278,18 +278,8 @@ class CharacterEditor extends UIState {
closeCurrentContextMenu();
openContextMenu(topMenu[2].childs);
}
if (FlxG.mouse.justPressed) {
FlxG.mouse.getScreenPosition(charCamera, camDrag);
camDrag *= camDragSpeed;
camDrag += charCamera.scroll;
}
if (FlxG.mouse.pressed) {
var pos = FlxG.mouse.getScreenPosition(charCamera);
pos *= camDragSpeed;
nextScroll.set((camDrag.x - pos.x), (camDrag.y - pos.y));
nextScroll.set(nextScroll.x - FlxG.mouse.deltaScreenX, nextScroll.y - FlxG.mouse.deltaScreenY);
currentCursor = HAND;
} else
currentCursor = ARROW;
+1 -1
View File
@@ -104,7 +104,7 @@ class UIButtonList<T:UIButton> extends UIWindow {
super.update(elapsed);
nextscrollY = FlxMath.bound(buttonCameras.scroll.y - (hovered ? FlxG.mouse.wheel : 0) * 6, -buttonSpacing, Math.max((addButton.y + 32 + (buttonSpacing*1.5)) - buttonCameras.height, -buttonSpacing));
nextscrollY = FlxMath.bound(buttonCameras.scroll.y - (hovered ? FlxG.mouse.wheel : 0) * 12, -buttonSpacing, Math.max((addButton.y + 32 + (buttonSpacing*1.5)) - buttonCameras.height, -buttonSpacing));
if (curMoving != null && dragging) {
nextscrollY -= Math.min((bHeight - 100) - FlxG.mouse.getWorldPosition(buttonCameras).y, 0) / 8;