From c4749636d3b706bf9d96c2910688a95a4092f672 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 17 Dec 2024 10:30:54 -0500 Subject: [PATCH] Fix some variable naming issues caused by HaxeUI (Ideally revert this in the future) --- .../debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx | 6 +++--- .../debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx | 2 +- source/funkin/ui/haxeui/components/CharacterPlayer.hx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx index c65781259..d01af8d7b 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorFreeplayToolbox.hx @@ -382,7 +382,7 @@ class ChartEditorFreeplayToolbox extends ChartEditorBaseToolbox // Determine the position of the mouse relative to the var mouseXPos = FlxG.mouse.x; - var relativeMouseXPos = mouseXPos - waveformScrollview.screenX; + var relativeMouseXPos = mouseXPos - waveformScrollview.cachedScreenX; var targetPlayheadPos = relativeMouseXPos + waveformScrollview.hscrollPos; // Move the playhead to the mouse position. @@ -415,8 +415,8 @@ class ChartEditorFreeplayToolbox extends ChartEditorBaseToolbox var currentAbsMousePos = FlxG.mouse.x; var dragDiff = currentAbsMousePos - waveformDragStartPos; - var currentRelativeMousePos = currentAbsMousePos - waveformScrollview.screenX; - var relativeStartPos = waveformDragStartPos - waveformScrollview.screenX; + var currentRelativeMousePos = currentAbsMousePos - waveformScrollview.cachedScreenX; + var relativeStartPos = waveformDragStartPos - waveformScrollview.cachedScreenX; var isDraggingRight = dragDiff > 0; var hasDraggedEnough = Math.abs(dragDiff) > 10; diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx index 46721edfa..0d12684ed 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx @@ -368,7 +368,7 @@ class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox // Determine the position of the mouse relative to the var mouseXPos = FlxG.mouse.x; - var relativeMouseXPos = mouseXPos - waveformScrollview.screenX; + var relativeMouseXPos = mouseXPos - waveformScrollview.cachedScreenX; var targetPlayheadPos = relativeMouseXPos + waveformScrollview.hscrollPos; // Move the playhead to the mouse position. diff --git a/source/funkin/ui/haxeui/components/CharacterPlayer.hx b/source/funkin/ui/haxeui/components/CharacterPlayer.hx index 77b23d68a..f1b871f3f 100644 --- a/source/funkin/ui/haxeui/components/CharacterPlayer.hx +++ b/source/funkin/ui/haxeui/components/CharacterPlayer.hx @@ -177,8 +177,8 @@ class CharacterPlayer extends Box override function repositionChildren():Void { super.repositionChildren(); - character.x = this.screenX; - character.y = this.screenY; + character.x = this.cachedScreenX; + character.y = this.cachedScreenY; // Apply animation offsets, so the character is positioned correctly based on the animation. @:privateAccess var animOffsets:Array = character.animOffsets;