Skip to content

Commit

Permalink
add never show option for outdatedState + crashState fix for mobile???
Browse files Browse the repository at this point in the history
  • Loading branch information
HRK-EXEX committed Nov 27, 2024
1 parent be18a71 commit 1d34af6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions source/mikolka/vslice/CrashState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class CrashState extends FlxState
musicState = new MusicBeatState();
musicState.removeTouchPad();
musicState.addTouchPad('NONE', 'A_B');
musicState.addTouchPadCamera();
#end

cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]];
Expand Down
40 changes: 20 additions & 20 deletions source/states/OutdatedState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package states;
class OutdatedState extends MusicBeatState
{
public static var leftState:Bool = false;
var toInt = CoolUtil.int();

var warnText:FlxText;
override function create()
Expand All @@ -11,32 +12,28 @@ class OutdatedState extends MusicBeatState

var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
add(bg);

var operates = [
["ENTER", "ESCAPE", "BACKSPACE"],
["A", "B", "C"]
];

var guh:String;

if (controls.mobileC) {
guh = "Sup kiddo, looks like you're running an \n
outdated version of H-Slice Engine (" + MainMenuState.hrkVersion + "),\n
please update to " + TitleState.updateVersion + "!\n
Press B to proceed anyway.\n
\n
Thank you for using the Port!";
} else {
guh = "Sup bro, looks like you're running an \n
outdated version of H-Slice Engine (" + MainMenuState.hrkVersion + "),\n
please update to " + TitleState.updateVersion + "!\n
Press ESCAPE to proceed anyway.\n
\n
Thank you for using the Engine!";
}
var guh:String = 'Sup kiddo, looks like you\'re running an\n
outdated version of H-Slice Engine (${MainMenuState.hrkVersion}),\n
please update to ${TitleState.updateVersion}!\n
Press ${operates[toInt((controls.mobileC))][0]} to go releases page.\n
Press ${operates[toInt((controls.mobileC))][1]} to proceed anyway.\n
Press ${operates[toInt((controls.mobileC))][2]} to also proceed anyway\n
but this message has shown NEVER again.\n\n
Thank you for using the Port!';

warnText = new FlxText(0, 0, FlxG.width, guh, 32);
warnText.setFormat(Paths.font("vcr.ttf"), 32, FlxColor.WHITE, CENTER);
warnText.screenCenter(Y);
warnText.antialiasing = ClientPrefs.data.antialiasing;
add(warnText);
#if TOUCH_CONTROLS_ALLOWED
addTouchPad('NONE', 'A_B');
addTouchPad('NONE', 'A_B_C');
#end
}

Expand All @@ -45,9 +42,12 @@ class OutdatedState extends MusicBeatState
if(!leftState) {
if (controls.ACCEPT) {
leftState = true;
CoolUtil.browserLoad("https://github.com/Psych-Slice/P-Slice/releases");
CoolUtil.browserLoad("https://github.com/HRK-EXEX/H-Slice/releases");
}
else if(#if TOUCH_CONTROLS_ALLOWED touchPad.buttonB.justPressed #else FlxG.keys.justPressed.ESCAPE #end) {
leftState = true;
}
else if(controls.BACK) {
else if(#if TOUCH_CONTROLS_ALLOWED touchPad.buttonC.justPressed #else FlxG.keys.justPressed.BACKSPACE #end) {
leftState = true;
}

Expand Down

0 comments on commit 1d34af6

Please sign in to comment.