54 lines
1.4 KiB
Haxe
54 lines
1.4 KiB
Haxe
package;
|
|
|
|
import flixel.FlxG;
|
|
import flixel.FlxSprite;
|
|
import flixel.FlxSubState;
|
|
import flixel.text.FlxText;
|
|
import flixel.util.FlxColor;
|
|
import flixel.effects.FlxFlicker;
|
|
import lime.app.Application;
|
|
import flixel.addons.transition.FlxTransitionableState;
|
|
import flixel.tweens.FlxTween;
|
|
import flixel.util.FlxTimer;
|
|
|
|
class OutdatedState extends MusicBeatState
|
|
{
|
|
public static var leftState:Bool = false;
|
|
|
|
var warnText:FlxText;
|
|
override function create()
|
|
{
|
|
super.create();
|
|
|
|
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
|
|
add(bg);
|
|
|
|
warnText = new FlxText(0, 0, FlxG.width,
|
|
"Sup bro, looks like you're running an \n
|
|
outdated version of Psych Engine (" + MainMenuState.psychEngineVersion + "),\n
|
|
please update to " + TitleState.updateVersion + "!\n
|
|
\n
|
|
Thank you for using the Engine!",
|
|
32);
|
|
warnText.setFormat("VCR OSD Mono", 32, FlxColor.WHITE, CENTER);
|
|
warnText.screenCenter(Y);
|
|
add(warnText);
|
|
}
|
|
|
|
override function update(elapsed:Float)
|
|
{
|
|
if(!leftState) {
|
|
if (controls.ACCEPT || controls.BACK) {
|
|
leftState = true;
|
|
CoolUtil.browserLoad("https://github.com/ShadowMario/FNF-PsychEngine/releases");
|
|
FlxG.sound.play(Paths.sound('cancelMenu'));
|
|
FlxTween.tween(warnText, {alpha: 0}, 1, {
|
|
onComplete: function (twn:FlxTween) {
|
|
MusicBeatState.switchState(new MainMenuState());
|
|
}
|
|
});
|
|
}
|
|
}
|
|
super.update(elapsed);
|
|
}
|
|
}
|