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; public static var needVer:String = "IDFK LOL"; 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, "Kade Engine is Outdated!\n" + ver + " is your current version while the most recent version is " + needVer + "! Press Space to go to the github 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://github.com/KadeDev/Kade-Engine/releases/latest"); } if (controls.BACK) { leftState = true; FlxG.switchState(new MainMenuState()); } super.update(elapsed); } }