1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-30 10:44:37 +00:00
Funkin/source/OutdatedSubState.hx
2020-12-25 18:24:20 -05:00

46 lines
1.1 KiB
Haxe

package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxSubState;
import flixel.text.FlxText;
import flixel.util.FlxColor;
import lime.app.Application;
class OutdatedSubState extends MusicBeatState
{
public static var leftState:Bool = false;
override function create()
{
super.create();
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
add(bg);
var ver = "v" + Application.current.meta.get('version');
var txt:FlxText = new FlxText(0, 0, FlxG.width,
"HEY! You're running an outdated version of the game!\nCurrent version is "
+ ver
+ " while the most recent version is "
+ NGio.GAME_VER
+ "! Press Space to go to itch.io, or ESCAPE to ignore this!!",
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)
{
leftState = true;
FlxG.switchState(new MainMenuState());
}
super.update(elapsed);
}
}