Funkin/source/funkin/ui/title/OutdatedSubState.hx

48 lines
1.2 KiB
Haxe
Raw Normal View History

package funkin.ui.title;
2020-12-22 19:57:55 -05:00
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 funkin.ui.MusicBeatState;
2020-12-22 19:57:55 -05:00
import lime.app.Application;
#if newgrounds
2020-12-25 00:17:21 -05:00
class OutdatedSubState extends MusicBeatState
2020-12-22 19:57:55 -05:00
{
public static var leftState:Bool = false;
2020-12-25 00:17:21 -05:00
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);
}
2020-12-22 19:57:55 -05:00
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);
}
2020-12-22 19:57:55 -05:00
}
#end