Merge branch 'master' into feature/various-haptic-changes
This commit is contained in:
+1
-1
Submodule art updated: 5b5a207789...01d9d25f89
@@ -166,7 +166,7 @@ class ControlsSchemeMenu extends MusicBeatSubState
|
||||
for (i in 0...availableSchemes.length)
|
||||
{
|
||||
final hitboxShowcase:HitboxShowcase = new HitboxShowcase(0, 0, i, currentIndex, availableSchemes[i], onSelectHitbox);
|
||||
hitboxShowcase.x = Math.floor(FlxG.width * -0.16 + (1500 * (i * FullScreenScaleMode.windowScale.x)));
|
||||
hitboxShowcase.x = Math.floor(FlxG.width * -0.16 + (1500 * (i * FullScreenScaleMode.wideScale.x)));
|
||||
hitboxShowcases.add(hitboxShowcase);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class DialogueBox extends FlxSpriteGroup implements IDialogueScriptedClass imple
|
||||
this.x += xDiff;
|
||||
this.y += yDiff;
|
||||
|
||||
if (FullScreenScaleMode.windowScale.x != 1)
|
||||
if (FullScreenScaleMode.wideScale.x != 1)
|
||||
{
|
||||
this.x *= fullscreenScale;
|
||||
this.y = this.y * fullscreenScale + (-100 * fullscreenScale);
|
||||
@@ -104,7 +104,7 @@ class DialogueBox extends FlxSpriteGroup implements IDialogueScriptedClass imple
|
||||
|
||||
function get_fullscreenScale():Float
|
||||
{
|
||||
return FullScreenScaleMode.windowScale.x - 0.05;
|
||||
return FullScreenScaleMode.wideScale.x - 0.05;
|
||||
}
|
||||
|
||||
public function new(id:String)
|
||||
@@ -208,7 +208,7 @@ class DialogueBox extends FlxSpriteGroup implements IDialogueScriptedClass imple
|
||||
{
|
||||
if (scale == null) scale = 1.0;
|
||||
|
||||
if (FullScreenScaleMode.windowScale.x != 1)
|
||||
if (FullScreenScaleMode.wideScale.x != 1)
|
||||
{
|
||||
scale *= fullscreenScale;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ class DialogueBox extends FlxSpriteGroup implements IDialogueScriptedClass imple
|
||||
textDisplay.x += _data.text.offsets[0];
|
||||
textDisplay.y += _data.text.offsets[1];
|
||||
|
||||
if (FullScreenScaleMode.windowScale.x != 1)
|
||||
if (FullScreenScaleMode.wideScale.x != 1)
|
||||
{
|
||||
textDisplay.fieldWidth *= fullscreenScale;
|
||||
textDisplay.x *= fullscreenScale;
|
||||
|
||||
@@ -67,7 +67,7 @@ class Speaker extends FlxSprite implements IDialogueScriptedClass implements IRe
|
||||
this.x += xDiff;
|
||||
this.y += yDiff;
|
||||
|
||||
if (FullScreenScaleMode.windowScale.x != 1)
|
||||
if (FullScreenScaleMode.wideScale.x != 1)
|
||||
{
|
||||
this.x *= fullscreenScale;
|
||||
this.y = this.y * fullscreenScale + (-100 * fullscreenScale);
|
||||
@@ -83,7 +83,7 @@ class Speaker extends FlxSprite implements IDialogueScriptedClass implements IRe
|
||||
|
||||
function get_fullscreenScale():Float
|
||||
{
|
||||
return FullScreenScaleMode.windowScale.x - 0.05;
|
||||
return FullScreenScaleMode.wideScale.x - 0.05;
|
||||
}
|
||||
|
||||
public function new(id:String)
|
||||
@@ -170,7 +170,7 @@ class Speaker extends FlxSprite implements IDialogueScriptedClass implements IRe
|
||||
{
|
||||
if (scale == null) scale = 1.0;
|
||||
|
||||
if (FullScreenScaleMode.windowScale.x != 1)
|
||||
if (FullScreenScaleMode.wideScale.x != 1)
|
||||
{
|
||||
scale *= fullscreenScale;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,12 @@ class FullScreenScaleMode extends flixel.system.scaleModes.BaseScaleMode
|
||||
*/
|
||||
public static var notchSize:FlxPoint = FlxPoint.get(0, 0);
|
||||
|
||||
/**
|
||||
* The size of the game in screen resolution relativly to the initial size.
|
||||
* eg: If screen is 1080p and initial size of the game is 1280x720 then this is 1920x1080.
|
||||
*/
|
||||
public static var logicalSize:FlxPoint = FlxPoint.get(0, 0);
|
||||
|
||||
/**
|
||||
* The maximum aspect ratio a screen can have.
|
||||
*/
|
||||
@@ -59,12 +65,12 @@ class FullScreenScaleMode extends flixel.system.scaleModes.BaseScaleMode
|
||||
/**
|
||||
* The aspect ratio of the window.
|
||||
*/
|
||||
public static var windowRatio:Float = -1;
|
||||
public static var screenRatio:Float = -1;
|
||||
|
||||
/**
|
||||
* The scale factor for the window.
|
||||
*/
|
||||
public static var windowScale:FlxPoint = FlxPoint.get(1, 1);
|
||||
public static var wideScale:FlxPoint = FlxPoint.get(1, 1);
|
||||
|
||||
/**
|
||||
* Axis used to determine the ratio (X or Y).
|
||||
@@ -100,6 +106,9 @@ class FullScreenScaleMode extends flixel.system.scaleModes.BaseScaleMode
|
||||
|
||||
instance = this;
|
||||
|
||||
// Required so we can check on which axies is the game wide.
|
||||
if (FlxG.stage != null) updateGameSize(FlxG.stage.stageWidth, FlxG.stage.stageHeight);
|
||||
|
||||
enabled = enable;
|
||||
}
|
||||
|
||||
@@ -122,25 +131,7 @@ class FullScreenScaleMode extends flixel.system.scaleModes.BaseScaleMode
|
||||
updateScaleOffset();
|
||||
updateGamePosition();
|
||||
|
||||
adjustWindowScale();
|
||||
}
|
||||
|
||||
private function updateDeviceCutout(Width:Int, Height:Int):Void
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
cutoutSize.set(ratioAxis != Y ? Width - gameSize.x : 0, ratioAxis == Y ? Height - gameSize.y : 0);
|
||||
#if android
|
||||
gameCutoutSize.set(ratioAxis != Y ? cutoutSize.x / 2 : 0, ratioAxis == Y ? cutoutSize.y / 2 : 0);
|
||||
#else
|
||||
gameCutoutSize.set(ratioAxis != Y ? cutoutSize.x : 0, ratioAxis == Y ? cutoutSize.y : 0);
|
||||
#end
|
||||
}
|
||||
else
|
||||
{
|
||||
cutoutSize.set(0, 0);
|
||||
gameCutoutSize.set(0, 0);
|
||||
}
|
||||
adjustGameSize();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -234,130 +225,174 @@ class FullScreenScaleMode extends flixel.system.scaleModes.BaseScaleMode
|
||||
hasFakeCutouts = false;
|
||||
}
|
||||
|
||||
private function updateDeviceCutout(Width:Int, Height:Int):Void
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
cutoutSize.x = ratioAxis == X ? Math.ceil(Width - logicalSize.x) : 0;
|
||||
cutoutSize.y = ratioAxis == Y ? Math.ceil(Height - logicalSize.y) : 0;
|
||||
gameCutoutSize.copyFrom(cutoutSize);
|
||||
gameCutoutSize /= logicalSize.x / FlxG.initialWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
cutoutSize.set(0, 0);
|
||||
gameCutoutSize.set(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
override public function updateGameSize(Width:Int, Height:Int):Void
|
||||
{
|
||||
gameRatio = FlxG.width / FlxG.height;
|
||||
screenRatio = Width / Height;
|
||||
ratioAxis = screenRatio < gameRatio ? FlxAxes.Y : FlxAxes.X;
|
||||
|
||||
logicalSize.set(Width, Height);
|
||||
|
||||
if (ratioAxis == FlxAxes.Y)
|
||||
{
|
||||
gameSize.x = Width;
|
||||
logicalSize.y = Math.ceil(gameSize.x / gameRatio);
|
||||
gameSize.y = enabled ? Height : logicalSize.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
gameSize.y = Height;
|
||||
logicalSize.x = Math.ceil(gameSize.y * gameRatio);
|
||||
gameSize.x = enabled ? Width : logicalSize.x;
|
||||
}
|
||||
}
|
||||
|
||||
override public function updateScaleOffset():Void
|
||||
{
|
||||
scale.x = ratioAxis == X ? logicalSize.x / FlxG.width : deviceSize.x / FlxG.width;
|
||||
scale.y = ratioAxis == Y ? logicalSize.y / FlxG.height : deviceSize.y / FlxG.height;
|
||||
updateOffsetX();
|
||||
updateOffsetY();
|
||||
}
|
||||
|
||||
#if mobile
|
||||
private function updateDeviceNotch(notch:lime.math.Rectangle):Void
|
||||
{
|
||||
notchPosition.set(enabled ? notch.x : 0, enabled ? notch.y : 0);
|
||||
notchSize.set(enabled ? notch.width : 0, enabled ? notch.height : 0);
|
||||
gameNotchPosition.set((notchPosition.x * scale.x) / 2, (notchPosition.y * scale.y) / 2);
|
||||
gameNotchSize.set((notchSize.x * scale.x) / 2, (notchSize.y * scale.y) / 2);
|
||||
gameNotchPosition.copyFrom(notchPosition);
|
||||
gameNotchSize.copyFrom(notchSize);
|
||||
|
||||
final scale:Float = logicalSize.x / FlxG.initialWidth;
|
||||
if (Math.ceil(logicalSize.x) > FlxG.initialWidth)
|
||||
{
|
||||
gameNotchPosition /= scale;
|
||||
gameNotchSize /= scale;
|
||||
}
|
||||
else
|
||||
{
|
||||
gameNotchPosition *= scale;
|
||||
gameNotchSize *= scale;
|
||||
}
|
||||
|
||||
#if ios
|
||||
gameNotchPosition /= 2;
|
||||
gameNotchSize /= 2;
|
||||
#end
|
||||
}
|
||||
#end
|
||||
|
||||
private function adjustWindowScale():Void
|
||||
public function reset():Void
|
||||
{
|
||||
cutoutSize.set(0, 0);
|
||||
gameCutoutSize.set(0, 0);
|
||||
notchSize.set(0, 0);
|
||||
gameNotchSize.set(0, 0);
|
||||
notchPosition.set(0, 0);
|
||||
gameNotchPosition.set(0, 0);
|
||||
}
|
||||
|
||||
private function adjustGameSize():Void
|
||||
{
|
||||
if ((cutoutSize.x > 0 || cutoutSize.y > 0) && enabled)
|
||||
{
|
||||
windowScale.set(1, 1);
|
||||
wideScale.set(1, 1);
|
||||
|
||||
if (ratioAxis == Y)
|
||||
{
|
||||
gameSize.y += cutoutSize.y;
|
||||
|
||||
var gameHeight:Float = gameSize.y / scale.y;
|
||||
|
||||
#if desktop
|
||||
if (MathUtil.gcd(FlxG.width, Math.ceil(gameHeight)) == 1)
|
||||
{
|
||||
gameSize.y -= cutoutSize.y;
|
||||
cutoutSize.set(0, 0);
|
||||
gameCutoutSize.set(0, 0);
|
||||
notchSize.set(0, 0);
|
||||
gameNotchSize.set(0, 0);
|
||||
notchPosition.set(0, 0);
|
||||
gameNotchPosition.set(0, 0);
|
||||
|
||||
offset.y = Math.ceil((deviceSize.y - gameSize.y) * 0.5);
|
||||
updateGamePosition();
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
#end
|
||||
|
||||
if (gameHeight / FlxG.width > maxAspectRatio.y / maxAspectRatio.x && maxRatioAxis.y)
|
||||
{
|
||||
final oldGameHeight = gameHeight;
|
||||
final oldGameHeight = gameSize.y;
|
||||
gameHeight = ((gameSize.x / scale.x) / maxAspectRatio.x) * maxAspectRatio.y;
|
||||
cutoutSize.set(0, cutoutSize.y - (oldGameHeight - gameHeight));
|
||||
#if android
|
||||
gameCutoutSize.set(0, cutoutSize.y / 2);
|
||||
#else
|
||||
gameSize.y = gameHeight * scale.y;
|
||||
|
||||
final sizeDifference:Float = oldGameHeight - gameSize.y;
|
||||
final scale:Float = logicalSize.y / FlxG.initialHeight;
|
||||
cutoutSize.set(0, cutoutSize.y - sizeDifference);
|
||||
gameCutoutSize.copyFrom(cutoutSize);
|
||||
#end
|
||||
offset.y = Math.ceil((deviceSize.y - (gameHeight * scale.y)) * 0.5);
|
||||
gameCutoutSize /= scale;
|
||||
|
||||
notchSize.y = Math.max(0, notchSize.y - sizeDifference);
|
||||
gameNotchSize.y = notchSize.y / scale;
|
||||
|
||||
offset.y = Math.ceil((deviceSize.y - gameSize.y) * 0.5);
|
||||
updateGamePosition();
|
||||
}
|
||||
|
||||
untyped FlxG.height = Math.ceil(gameHeight);
|
||||
|
||||
windowScale.y = FlxG.height / FlxG.initialHeight;
|
||||
wideScale.y = FlxG.height / FlxG.initialHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
gameSize.x += cutoutSize.x;
|
||||
|
||||
var gameWidth:Float = gameSize.x / scale.x;
|
||||
|
||||
#if desktop
|
||||
if (MathUtil.gcd(Math.ceil(gameWidth), FlxG.height) == 1)
|
||||
{
|
||||
gameSize.x -= cutoutSize.x;
|
||||
cutoutSize.set(0, 0);
|
||||
gameCutoutSize.set(0, 0);
|
||||
notchSize.set(0, 0);
|
||||
gameNotchSize.set(0, 0);
|
||||
notchPosition.set(0, 0);
|
||||
gameNotchPosition.set(0, 0);
|
||||
|
||||
offset.x = Math.ceil((deviceSize.x - gameSize.x) * 0.5);
|
||||
updateGamePosition();
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
#end
|
||||
|
||||
if (gameWidth / FlxG.height > maxAspectRatio.x / maxAspectRatio.y && maxRatioAxis.x)
|
||||
{
|
||||
final oldGameWidth = gameWidth;
|
||||
final oldGameWidth = gameSize.x;
|
||||
gameWidth = ((gameSize.y / scale.y) / maxAspectRatio.y) * maxAspectRatio.x;
|
||||
cutoutSize.set(cutoutSize.x - (oldGameWidth - gameWidth), 0);
|
||||
#if android
|
||||
gameCutoutSize.set(cutoutSize.x / 2, 0);
|
||||
#else
|
||||
gameSize.x = gameWidth * scale.x;
|
||||
|
||||
final sizeDifference:Float = oldGameWidth - gameSize.x;
|
||||
final scale:Float = logicalSize.x / FlxG.initialWidth;
|
||||
cutoutSize.set(cutoutSize.x - sizeDifference, 0);
|
||||
gameCutoutSize.copyFrom(cutoutSize);
|
||||
#end
|
||||
offset.x = Math.ceil((deviceSize.x - (gameWidth * scale.x)) * 0.5);
|
||||
gameCutoutSize /= scale;
|
||||
|
||||
notchSize.x = Math.max(0, notchSize.x - sizeDifference);
|
||||
gameNotchSize.x = notchSize.x / scale;
|
||||
|
||||
offset.x = Math.ceil((deviceSize.x - gameSize.x) * 0.5);
|
||||
updateGamePosition();
|
||||
}
|
||||
|
||||
untyped FlxG.width = Math.ceil(gameWidth);
|
||||
|
||||
windowScale.x = FlxG.width / FlxG.initialWidth;
|
||||
wideScale.x = FlxG.width / FlxG.initialWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the game size based on the provided width and height.
|
||||
* @param Width The width of the screen.
|
||||
* @param Height The height of the screen.
|
||||
*/
|
||||
override public function updateGameSize(Width:Int, Height:Int):Void
|
||||
{
|
||||
gameRatio = FlxG.width / FlxG.height;
|
||||
windowRatio = Width / Height;
|
||||
ratioAxis = windowRatio < gameRatio ? FlxAxes.Y : FlxAxes.X;
|
||||
|
||||
if (ratioAxis == FlxAxes.Y)
|
||||
{
|
||||
gameSize.x = Width;
|
||||
gameSize.y = Math.ceil(gameSize.x / gameRatio);
|
||||
}
|
||||
else
|
||||
{
|
||||
gameSize.y = Height;
|
||||
gameSize.x = Math.ceil(gameSize.y * gameRatio);
|
||||
}
|
||||
}
|
||||
|
||||
@:noCompletion
|
||||
private static function set_enabled(Value:Bool):Bool
|
||||
{
|
||||
|
||||
@@ -6,8 +6,14 @@ import funkin.modding.events.ScriptEvent;
|
||||
|
||||
class CharSelectPlayer extends FlxAtlasSprite implements IBPMSyncedScriptedClass
|
||||
{
|
||||
var initialX:Float = 0;
|
||||
var initialY:Float = 0;
|
||||
|
||||
public function new(x:Float, y:Float)
|
||||
{
|
||||
initialX = x;
|
||||
initialY = y;
|
||||
|
||||
super(x, y, Paths.animateAtlas("charSelect/bfChill"));
|
||||
|
||||
onAnimationComplete.add(function(animLabel:String) {
|
||||
@@ -53,13 +59,9 @@ class CharSelectPlayer extends FlxAtlasSprite implements IBPMSyncedScriptedClass
|
||||
{
|
||||
switch (str)
|
||||
{
|
||||
case "bf":
|
||||
x = 0;
|
||||
y = 0;
|
||||
case "pico":
|
||||
x = 0;
|
||||
y = 0;
|
||||
case "random":
|
||||
case "bf" | 'pico' | "random":
|
||||
x = initialX;
|
||||
y = initialY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,8 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
|
||||
var charHitbox:FlxObject;
|
||||
|
||||
var cutoutSize:Float = 0;
|
||||
|
||||
public function new()
|
||||
{
|
||||
super();
|
||||
@@ -130,14 +132,16 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
{
|
||||
super.create();
|
||||
|
||||
cutoutSize = FullScreenScaleMode.gameCutoutSize.x / 2;
|
||||
|
||||
bopInfo = FramesJSFLParser.parse(Paths.file("images/charSelect/iconBopInfo/iconBopInfo.txt"));
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-153, -140);
|
||||
var bg:FlxSprite = new FlxSprite(cutoutSize + -153, -140);
|
||||
bg.loadGraphic(Paths.image('charSelect/charSelectBG'));
|
||||
bg.scrollFactor.set(0.1, 0.1);
|
||||
add(bg);
|
||||
|
||||
var crowd:FlxAtlasSprite = new FlxAtlasSprite(0, 0, Paths.animateAtlas("charSelect/crowd"));
|
||||
var crowd:FlxAtlasSprite = new FlxAtlasSprite(cutoutSize, 0, Paths.animateAtlas("charSelect/crowd"));
|
||||
crowd.anim.play();
|
||||
crowd.anim.onComplete.add(function() {
|
||||
crowd.anim.play();
|
||||
@@ -145,13 +149,14 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
crowd.scrollFactor.set(0.3, 0.3);
|
||||
add(crowd);
|
||||
|
||||
var stageSpr:FlxSprite = new FlxSprite(-40, 391);
|
||||
stageSpr.frames = Paths.getSparrowAtlas("charSelect/charSelectStage");
|
||||
stageSpr.animation.addByPrefix("idle", "stage full instance 1", 24, true);
|
||||
stageSpr.animation.play("idle");
|
||||
var stageSpr:FlxAtlasSprite = new FlxAtlasSprite(cutoutSize + -2, 1, Paths.animateAtlas("charSelect/charSelectStage"));
|
||||
stageSpr.anim.play("");
|
||||
stageSpr.anim.onComplete.add(function() {
|
||||
stageSpr.anim.play("");
|
||||
});
|
||||
add(stageSpr);
|
||||
|
||||
var curtains:FlxSprite = new FlxSprite(-47, -49);
|
||||
var curtains:FlxSprite = new FlxSprite(cutoutSize + (-47 - 165), -49 - 50);
|
||||
curtains.loadGraphic(Paths.image('charSelect/curtains'));
|
||||
curtains.scrollFactor.set(1.4, 1.4);
|
||||
add(curtains);
|
||||
@@ -162,54 +167,57 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
barthing.anim.play("");
|
||||
});
|
||||
barthing.blend = BlendMode.MULTIPLY;
|
||||
barthing.scale.x = 2.5;
|
||||
barthing.scrollFactor.set(0, 0);
|
||||
add(barthing);
|
||||
|
||||
barthing.y += 80;
|
||||
FlxTween.tween(barthing, {y: barthing.y - 80}, 1.3, {ease: FlxEase.expoOut});
|
||||
|
||||
var charLight:FlxSprite = new FlxSprite(800, 250);
|
||||
var charLight:FlxSprite = new FlxSprite(cutoutSize + 800, 250);
|
||||
charLight.loadGraphic(Paths.image('charSelect/charLight'));
|
||||
add(charLight);
|
||||
|
||||
var charLightGF:FlxSprite = new FlxSprite(180, 240);
|
||||
var charLightGF:FlxSprite = new FlxSprite(cutoutSize + 180, 240);
|
||||
charLightGF.loadGraphic(Paths.image('charSelect/charLight'));
|
||||
add(charLightGF);
|
||||
|
||||
gfChill = new CharSelectGF();
|
||||
gfChill.switchGF("bf");
|
||||
gfChill.x += cutoutSize;
|
||||
add(gfChill);
|
||||
|
||||
playerChillOut = new CharSelectPlayer(0, 0);
|
||||
playerChillOut = new CharSelectPlayer(cutoutSize, 0);
|
||||
playerChillOut.switchChar("bf");
|
||||
playerChillOut.visible = false;
|
||||
add(playerChillOut);
|
||||
|
||||
playerChill = new CharSelectPlayer(0, 0);
|
||||
playerChill = new CharSelectPlayer(cutoutSize, 0);
|
||||
playerChill.switchChar("bf");
|
||||
add(playerChill);
|
||||
|
||||
var speakers:FlxAtlasSprite = new FlxAtlasSprite(0, 0, Paths.animateAtlas("charSelect/charSelectSpeakers"));
|
||||
var speakers:FlxAtlasSprite = new FlxAtlasSprite(cutoutSize - 10, 0, Paths.animateAtlas("charSelect/charSelectSpeakers"));
|
||||
speakers.anim.play("");
|
||||
speakers.anim.onComplete.add(function() {
|
||||
speakers.anim.play("");
|
||||
});
|
||||
speakers.scrollFactor.set(1.8, 1.8);
|
||||
speakers.scale.set(1.05, 1.05);
|
||||
add(speakers);
|
||||
|
||||
var fgBlur:FlxSprite = new FlxSprite(-125, 170);
|
||||
var fgBlur:FlxSprite = new FlxSprite(cutoutSize + -125, 170);
|
||||
fgBlur.loadGraphic(Paths.image('charSelect/foregroundBlur'));
|
||||
fgBlur.blend = openfl.display.BlendMode.MULTIPLY;
|
||||
add(fgBlur);
|
||||
|
||||
dipshitBlur = new FlxSprite(419, -65);
|
||||
dipshitBlur = new FlxSprite(cutoutSize + 419, -65);
|
||||
dipshitBlur.frames = Paths.getSparrowAtlas("charSelect/dipshitBlur");
|
||||
dipshitBlur.animation.addByPrefix('idle', "CHOOSE vertical offset instance 1", 24, true);
|
||||
dipshitBlur.blend = BlendMode.ADD;
|
||||
dipshitBlur.animation.play("idle");
|
||||
add(dipshitBlur);
|
||||
|
||||
dipshitBacking = new FlxSprite(423, -17);
|
||||
dipshitBacking = new FlxSprite(cutoutSize + 423, -17);
|
||||
dipshitBacking.frames = Paths.getSparrowAtlas("charSelect/dipshitBacking");
|
||||
dipshitBacking.animation.addByPrefix('idle', "CHOOSE horizontal offset instance 1", 24, true);
|
||||
dipshitBacking.blend = BlendMode.ADD;
|
||||
@@ -219,7 +227,7 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
dipshitBacking.y += 210;
|
||||
FlxTween.tween(dipshitBacking, {y: dipshitBacking.y - 210}, 1.1, {ease: FlxEase.expoOut});
|
||||
|
||||
chooseDipshit = new FlxSprite(426, -13);
|
||||
chooseDipshit = new FlxSprite(cutoutSize + 426, -13);
|
||||
chooseDipshit.loadGraphic(Paths.image('charSelect/chooseDipshit'));
|
||||
add(chooseDipshit);
|
||||
|
||||
@@ -234,6 +242,7 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
dipshitBlur.scrollFactor.set();
|
||||
|
||||
nametag = new Nametag();
|
||||
nametag.midpointX += cutoutSize;
|
||||
add(nametag);
|
||||
|
||||
nametag.scrollFactor.set();
|
||||
@@ -638,7 +647,7 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
|
||||
function updateIconPositions()
|
||||
{
|
||||
grpIcons.x = 450;
|
||||
grpIcons.x = cutoutSize + 450;
|
||||
grpIcons.y = 120;
|
||||
for (index => member in grpIcons.members)
|
||||
{
|
||||
@@ -719,7 +728,6 @@ class CharSelectSubState extends MusicBeatSubState
|
||||
{
|
||||
ease: FlxEase.backIn,
|
||||
onComplete: function(_) {
|
||||
funkin.ui.FullScreenScaleMode.enabled = true;
|
||||
FlxG.switchState(() -> FreeplayState.build(
|
||||
{
|
||||
{
|
||||
|
||||
@@ -6,7 +6,9 @@ import flixel.util.FlxTimer;
|
||||
|
||||
class Nametag extends FlxSprite
|
||||
{
|
||||
@:allow(funkin.ui.charSelect.CharSelectSubState)
|
||||
var midpointX(default, set):Float = 1008;
|
||||
@:allow(funkin.ui.charSelect.CharSelectSubState)
|
||||
var midpointY(default, set):Float = 100;
|
||||
var mosaicShader:MosaicEffect;
|
||||
|
||||
|
||||
@@ -746,7 +746,7 @@ class FreeplayState extends MusicBeatSubState
|
||||
funnyCam.bgColor = FlxColor.TRANSPARENT;
|
||||
FlxG.cameras.add(funnyCam, false);
|
||||
|
||||
rankVignette.scale.set(2 * FullScreenScaleMode.windowScale.x, 2 * FullScreenScaleMode.windowScale.y);
|
||||
rankVignette.scale.set(2 * FullScreenScaleMode.wideScale.x, 2 * FullScreenScaleMode.wideScale.y);
|
||||
rankVignette.updateHitbox();
|
||||
rankVignette.blend = BlendMode.ADD;
|
||||
// rankVignette.cameras = [rankCamera];
|
||||
@@ -1296,7 +1296,6 @@ class FreeplayState extends MusicBeatSubState
|
||||
fadeShader.fade(1.0, 0.0, 0.8, {ease: FlxEase.quadIn});
|
||||
FlxG.sound.music?.fadeOut(0.9, 0);
|
||||
new FlxTimer().start(0.9, _ -> {
|
||||
FullScreenScaleMode.enabled = false;
|
||||
FlxG.switchState(() -> new funkin.ui.charSelect.CharSelectSubState());
|
||||
});
|
||||
for (grpSpr in exitMoversCharSel.keys())
|
||||
@@ -1883,30 +1882,31 @@ class FreeplayState extends MusicBeatSubState
|
||||
{
|
||||
if (fnfFreeplay == null || freeplayTxtBg == null || freeplayArrow == null) return;
|
||||
|
||||
if (TouchUtil.justPressed && (TouchUtil.overlaps(fnfFreeplay) || TouchUtil.overlaps(freeplayTxtBg)))
|
||||
{
|
||||
_dragOffset = fnfFreeplay.x - TouchUtil.touch.x;
|
||||
_pressedOnFreeplay = true;
|
||||
}
|
||||
// Commenting this out for now, since it doesn't work properly with the new touch controls. - Zack
|
||||
// if (TouchUtil.justPressed && (TouchUtil.overlaps(fnfFreeplay) || TouchUtil.overlaps(freeplayTxtBg)))
|
||||
// {
|
||||
// _dragOffset = fnfFreeplay.x - TouchUtil.touch.x;
|
||||
// _pressedOnFreeplay = true;
|
||||
// }
|
||||
|
||||
if (_pressedOnFreeplay && TouchUtil.pressed)
|
||||
{
|
||||
final dragX:Float = TouchUtil.touch.x + _dragOffset;
|
||||
fnfFreeplay.x = dragX;
|
||||
freeplayTxtBg.x = dragX - 8;
|
||||
// if (_pressedOnFreeplay && TouchUtil.pressed)
|
||||
// {
|
||||
// final dragX:Float = TouchUtil.touch.x + _dragOffset;
|
||||
// fnfFreeplay.x = dragX;
|
||||
// freeplayTxtBg.x = dragX - 8;
|
||||
|
||||
if (diffSelRight != null && freeplayArrow.x + 160 < fnfFreeplay.x)
|
||||
{
|
||||
_pressedOnFreeplay = false;
|
||||
goBack();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fnfFreeplay.x = Math.max(FullScreenScaleMode.gameNotchSize.x, 8);
|
||||
freeplayTxtBg.x = FullScreenScaleMode.gameNotchSize.x;
|
||||
_pressedOnFreeplay = false;
|
||||
}
|
||||
// if (diffSelRight != null && freeplayArrow.x + 160 < fnfFreeplay.x)
|
||||
// {
|
||||
// _pressedOnFreeplay = false;
|
||||
// goBack();
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
fnfFreeplay.x = Math.max(FullScreenScaleMode.gameNotchSize.x, 8);
|
||||
freeplayTxtBg.x = FullScreenScaleMode.gameNotchSize.x;
|
||||
_pressedOnFreeplay = false;
|
||||
// }
|
||||
}
|
||||
#end
|
||||
|
||||
@@ -2784,6 +2784,13 @@ class DifficultySelector extends FlxSprite
|
||||
|
||||
pressed = press;
|
||||
}
|
||||
|
||||
override function updateHitbox()
|
||||
{
|
||||
super.updateHitbox();
|
||||
width *= 1.5;
|
||||
height *= 1.5;
|
||||
}
|
||||
#end
|
||||
|
||||
function moveShitDown():Void
|
||||
|
||||
@@ -624,7 +624,7 @@ class SongMenuItem extends FlxSpriteGroup
|
||||
capsule.scale.y *= realScaled;
|
||||
|
||||
frameInTypeBeat += 1;
|
||||
final shiftx:Float = FullScreenScaleMode.windowScale.x * 320;
|
||||
final shiftx:Float = FullScreenScaleMode.wideScale.x * 320;
|
||||
final widescreenMult:Float = (FullScreenScaleMode.gameCutoutSize.x / 1.5) * 0.75;
|
||||
// Move the targetPos set to the if statement below if you want them to shift to their target positions after jumping in instead
|
||||
// I have no idea why this if instead of frameInTypeBeat == xFrames.length works even though they're the same thing
|
||||
|
||||
Reference in New Issue
Block a user