Remove a bunch of deprecation warnings

This commit is contained in:
EliteMasterEric
2025-05-28 16:33:10 -07:00
committed by Kade
parent 25e04cf061
commit fc83685b0f
16 changed files with 59 additions and 58 deletions
+7 -7
View File
@@ -97,37 +97,37 @@ class DebugMenuSubState extends MusicBeatSubState
return item;
}
function openChartEditor()
function openChartEditor():Void
{
FlxTransitionableState.skipNextTransIn = true;
FlxG.switchState(() -> new ChartEditorState());
}
function openInputOffsetTesting()
function openInputOffsetTesting():Void
{
openSubState(new funkin.ui.debug.latency.LatencyState());
trace('Input Offset Testing');
}
function openCharSelect()
function openCharSelect():Void
{
FlxG.switchState(new funkin.ui.charSelect.CharSelectSubState());
FlxG.switchState(() -> new funkin.ui.charSelect.CharSelectSubState());
}
function openAnimationEditor()
function openAnimationEditor():Void
{
FlxG.switchState(() -> new funkin.ui.debug.anim.DebugBoundingState());
trace('Animation Editor');
}
function testStickers()
function testStickers():Void
{
openSubState(new funkin.ui.transition.stickers.StickerSubState({}));
trace('opened stickers');
}
function openStageEditor()
function openStageEditor():Void
{
trace('Stage Editor');
}
@@ -68,11 +68,11 @@ class DebugBoundingState extends FlxState
function get_haxeUIFocused():Bool
{
// get the screen position, according to the HUD camera, temp default to FlxG.camera juuust in case?
var hudMousePos:FlxPoint = FlxG.mouse.getScreenPosition(hudCam ?? FlxG.camera);
var hudMousePos:FlxPoint = FlxG.mouse.getViewPosition(hudCam ?? FlxG.camera);
return Screen.instance.hasSolidComponentUnderPoint(hudMousePos.x, hudMousePos.y);
}
override function create()
override function create():Void
{
Paths.setCurrentLevel('week1');
@@ -1354,7 +1354,7 @@ class ChartEditorDialogHandler
new FlxTimer().start(EPSILON, function(_) {
for (handler in dropHandlers)
{
if (handler.component.hitTest(FlxG.mouse.screenX, FlxG.mouse.screenY))
if (handler.component.hitTest(FlxG.mouse.viewX, FlxG.mouse.viewY))
{
handler.handler(path);
return;
@@ -729,8 +729,8 @@ class StageEditorState extends UIState
bottomBarSelectText.text = infoSelection;
// ui stuff
nameTxt.x = FlxG.mouse.getScreenPosition(camHUD).x;
nameTxt.y = FlxG.mouse.getScreenPosition(camHUD).y - nameTxt.height;
nameTxt.x = FlxG.mouse.getViewPosition(camHUD).x;
nameTxt.y = FlxG.mouse.getViewPosition(camHUD).y - nameTxt.height;
// spriteMarker.visible = (moveMode == "assets" && selectedSprite != null);
camMarker.visible = moveMode == "chars";
@@ -946,7 +946,7 @@ class StageEditorState extends UIState
{
if (FlxG.mouse.overlaps(spr) /*spr.overlapsPoint(FlxG.mouse.getWorldPosition(spr.camera), true, spr.camera) */
&& Screen.instance != null
&& !Screen.instance.hasSolidComponentUnderPoint(FlxG.mouse.screenX, FlxG.mouse.screenY)
&& !Screen.instance.hasSolidComponentUnderPoint(FlxG.mouse.viewX, FlxG.mouse.viewY)
&& WindowManager.instance.windows.length == 0) // ik its stupid but maybe I have other cases soon (i did)
return true;