Flixel 5.0.0 migration + FlxColor in HScript

This commit is contained in:
Yoshman29
2022-12-22 21:09:19 +01:00
parent 15d7672d53
commit 639a018adb
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
1683
1697
+2 -1
View File
@@ -1,5 +1,6 @@
package funkin.desktop.sprites;
import flixel.math.FlxRect;
import flixel.FlxSprite;
import flixel.text.FlxText;
import flixel.FlxObject;
@@ -26,7 +27,7 @@ class Checkbox extends WindowText {
super.update(elapsed);
checkboxSprite.update(elapsed);
var overlaps = DesktopMain.mouseInput.overlaps(this, camera) || DesktopMain.mouseInput.overlaps(checkboxSprite, camera);
var overlaps = DesktopMain.mouseInput.overlapsRect(this, new FlxRect(x, y, width + 20, height), camera);
var pressed = DesktopMain.mouseInput.pressed;
if (overlaps) {
-2
View File
@@ -41,13 +41,11 @@ class Script extends FlxBasic implements IFlxDestroyable {
"FlxSound" => flixel.system.FlxSound,
"FlxAssets" => flixel.system.FlxAssets,
"FlxMath" => flixel.math.FlxMath,
"FlxPoint" => flixel.math.FlxPoint,
"FlxGroup" => flixel.group.FlxGroup,
"FlxTypedGroup" => flixel.group.FlxGroup.FlxTypedGroup,
"FlxSpriteGroup" => flixel.group.FlxSpriteGroup,
"FlxTypeText" => flixel.addons.text.FlxTypeText,
"FlxText" => flixel.text.FlxText,
"FlxAxes" => flixel.util.FlxAxes,
"FlxTimer" => flixel.util.FlxTimer,
// Engine related stuff
+3 -1
View File
@@ -76,7 +76,7 @@ class CoolUtil
label++;
rSize /= 1024;
}
return '${Std.int(rSize) + "." + addZeros(Std.string(Math.round((rSize % 1) * 100)), 2)}${labels[label]}';
return '${Std.int(rSize) + "." + addZeros(Std.string(Std.int((rSize % 1) * 100)), 2)}${labels[label]}';
}
public static function fpsLerp(v1:Float, v2:Float, ratio:Float):Float {
@@ -246,6 +246,8 @@ class CoolUtil
obj.x = (cam.width - obj.width) / 2;
case Y:
obj.y = (cam.height - obj.height) / 2;
case NONE:
}
}