Funkin/source/OutdatedSubState.hx

45 lines
1.1 KiB
Haxe
Raw Normal View History

2020-12-22 19:57:55 -05:00
package;
2020-12-25 00:17:21 -05:00
import flixel.FlxSprite;
2020-12-22 19:57:55 -05:00
import flixel.FlxSubState;
import flixel.text.FlxText;
import flixel.util.FlxColor;
import lime.app.Application;
2020-12-25 00:17:21 -05:00
class OutdatedSubState extends MusicBeatState
2020-12-22 19:57:55 -05:00
{
2020-12-25 00:17:21 -05:00
public static var leftState:Bool = false;
override function create()
2020-12-22 19:57:55 -05:00
{
2020-12-25 00:17:21 -05:00
super.create();
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
add(bg);
2020-12-22 19:57:55 -05:00
var ver = "v" + Application.current.meta.get('version');
2020-12-25 00:17:21 -05:00
var txt:FlxText = new FlxText(0, 0, FlxG.width,
2020-12-22 19:57:55 -05:00
"HEY! You're running an outdated version of the game!\nCurrent version is "
+ ver
2020-12-25 18:24:20 -05:00
+ " while the most recent version is "
2020-12-22 19:57:55 -05:00
+ NGio.GAME_VER
2020-12-25 18:24:20 -05:00
+ "! Press Space to go to itch.io, or ESCAPE to ignore this!!",
2020-12-22 19:57:55 -05:00
32);
txt.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, CENTER);
txt.screenCenter();
add(txt);
}
override function update(elapsed:Float)
{
if (controls.ACCEPT)
{
FlxG.openURL("https://ninja-muffin24.itch.io/funkin");
}
if (controls.BACK)
{
2020-12-25 00:17:21 -05:00
leftState = true;
FlxG.switchState(new MainMenuState());
2020-12-22 19:57:55 -05:00
}
super.update(elapsed);
}
}