Skip to content

Commit

Permalink
last changes before actually releasing lol
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Nov 5, 2023
1 parent 48d7e2b commit 0331c2b
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion assets/data/tipText.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Tip:--Press the notes.
Funk all the way.
Friday Night Funkin'--uhhhhh.
RIP--Kade Engine...
You're currently playing--Joalor64 Engine v1.4.0 (UNRELEASED)
You're currently playing--Joalor64 Engine v1.4.0b
Do people actually read these?
diagnosis:--skill issue
USELESS INFO:--J64E was publicly released on April 14th, 2022.
Expand Down
2 changes: 1 addition & 1 deletion gitVersion.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version":"1.4.0b",
"description":"V1.4.0b releases later today lol"
"description":"V1.4.0b is out now yay!"
}
2 changes: 1 addition & 1 deletion source/meta/state/DonateScreenState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class DonateScreenState extends MusicBeatState
menuItem.animation.play('selected');
menuItem.updateHitbox();
menuItem.screenCenter(X);
add(menuItem);
menuItem.antialiasing = ClientPrefs.globalAntialiasing;
add(menuItem);

var textGroup:FlxTypedGroup<Alphabet> = new FlxTypedGroup<Alphabet>();
add(textGroup);
Expand Down
52 changes: 22 additions & 30 deletions source/meta/state/GameExitState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,10 @@ using StringTools;

class GameExitState extends MusicBeatState
{
var options:Array<String> = ['Yes', 'No'];

private var grpOptions:FlxTypedGroup<Alphabet>;
private static var curSelected:Int = 0;

function openSelectedSubstate(label:String) {
switch(label) {
case 'Yes':
quitGame();
case 'No':
StageData.loadDirectory(PlayState.SONG);
LoadingState.loadAndSwitchState(new PlayState());
}
}
var options:Array<String> = ['Yes', 'No'];

var accepted:Bool;
var allowInputs:Bool = false;
Expand Down Expand Up @@ -74,7 +64,17 @@ class GameExitState extends MusicBeatState
header.screenCenter(X);
add(header);

initOptions();
grpOptions = new FlxTypedGroup<Alphabet>();
add(grpOptions);

for (i in 0...options.length)
{
var optionText:Alphabet = new Alphabet(0, 0, options[i], true);
optionText.screenCenter();
optionText.y += (100 * (i - (options.length / 2))) + 50;
optionText.scrollFactor.set(0, Math.max(0.25 - (0.05 * (options.length - 4)), 0.1));
grpOptions.add(optionText);
}

selectorLeft = new Alphabet(0, 0, '>', true);
selectorLeft.scrollFactor.set(0, yScroll);
Expand All @@ -90,20 +90,6 @@ class GameExitState extends MusicBeatState
super.create();
}

function initOptions() {
grpOptions = new FlxTypedGroup<Alphabet>();
add(grpOptions);

for (i in 0...options.length)
{
var optionText:Alphabet = new Alphabet(0, 0, options[i], true);
optionText.screenCenter();
optionText.y += (100 * (i - (options.length / 2))) + 50;
optionText.scrollFactor.set(0, Math.max(0.25 - (0.05 * (options.length - 4)), 0.1));
grpOptions.add(optionText);
}
}

override function update(elapsed:Float) {
super.update(elapsed);

Expand All @@ -123,7 +109,7 @@ class GameExitState extends MusicBeatState

if (controls.ACCEPT && !accepted) {
accepted = true; // locks inputs
openSelectedSubstate(options[curSelected]);
selectOption(options[curSelected]);
}
}
}
Expand Down Expand Up @@ -154,7 +140,13 @@ class GameExitState extends MusicBeatState
}
}

function quitGame() {
FlxG.camera.fade(FlxColor.BLACK, 0.5, false, function() { Sys.exit(0); }, false);
function selectOption(label:String) {
switch(label) {
case 'Yes':
FlxG.camera.fade(FlxColor.BLACK, 0.5, false, function() { Sys.exit(0); }, false);
case 'No':
StageData.loadDirectory(PlayState.SONG);
LoadingState.loadAndSwitchState(new PlayState());
}
}
}
}
23 changes: 17 additions & 6 deletions source/meta/state/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,12 @@ class MainMenuState extends MusicBeatState
menuItem.ID = i;
if (menuJSON.alignToCenter)
menuItem.screenCenter(X);
FlxTween.tween(menuItem, {x: menuItem.width / 4 + (i * 60) - 55}, 1.3, {ease: FlxEase.expoInOut});
menuItems.add(menuItem);
menuItem.scrollFactor.set(0, 1);
menuItem.antialiasing = ClientPrefs.globalAntialiasing;
menuItem.updateHitbox();
if (optionShit[i] == '') menuItem.visible = false;
FlxTween.tween(menuItem, {x: menuItem.width / 4 + (i * 60) - 55}, 1.3, {ease: FlxEase.expoInOut});
if (firstStart)
FlxTween.tween(menuItem, {y: 60 + (i * 160)}, 1 + (i * 0.25), {
ease: FlxEase.expoInOut, onComplete: function(flxTween:FlxTween)
Expand All @@ -268,6 +269,8 @@ class MainMenuState extends MusicBeatState
menuItem.y = 60 + (i * 160);
}

firstStart = false;

FlxG.camera.follow(camFollowPos, null, 1);

// The system says hi :)
Expand Down Expand Up @@ -376,6 +379,11 @@ class MainMenuState extends MusicBeatState

if (controls.ACCEPT)
{
if (optionShit[curSelected] == '')
{
return;
}

if (optionShit[curSelected] == '${menuJSON.links[0]}')
{
CoolUtil.browserLoad('${menuJSON.links[1]}');
Expand Down Expand Up @@ -489,12 +497,15 @@ class MainMenuState extends MusicBeatState

function changeItem(huh:Int = 0)
{
curSelected += huh;
if (finishedFunnyMove)
{
curSelected += huh;

if (curSelected >= menuItems.length)
curSelected = 0;
if (curSelected < 0)
curSelected = menuItems.length - 1;
if (curSelected >= menuItems.length)
curSelected = 0;
if (curSelected < 0)
curSelected = menuItems.length - 1;
}

menuItems.forEach((spr:FlxSprite) ->
{
Expand Down

0 comments on commit 0331c2b

Please sign in to comment.