Skip to content

Commit

Permalink
yippee
Browse files Browse the repository at this point in the history
Added window name customizability per song
Brought back Title Screen Bouncing (USING PLAYSTATE CODE)
  • Loading branch information
JordanSantiagoYT committed Nov 17, 2023
1 parent 72e6c01 commit a180416
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4055,6 +4055,9 @@ class PlayState extends MusicBeatState

curSong = SONG.song;

if (SONG.windowName != null && SONG.windowName != '')
MusicBeatState.windowNamePrefix = SONG.windowName;

if (SONG.needsVoices && ClientPrefs.songLoading)
vocals = new FlxSound().loadEmbedded(Paths.voices(PlayState.SONG.song));
else
Expand Down Expand Up @@ -8754,6 +8757,7 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT
FlxG.sound.music.pitch = 1;
cpp.vm.Gc.enable(true);
KillNotes();
MusicBeatState.windowNamePrefix = "Friday Night Funkin': JS Engine";
super.destroy();
}

Expand Down
3 changes: 3 additions & 0 deletions source/Song.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ typedef SwagSong =
var event7:String;
var event7Value:String;

var windowName:String;

var arrowSkin:String;
var splashSkin:String;
var validScore:Bool;
Expand All @@ -49,6 +51,7 @@ class Song
public var songCredit:String;
public var event7:String;
public var event7Value:String;
public var windowName:String;
public var validScore:Bool = true;
public var player1:String = 'bf';
public var player2:String = 'dad';
Expand Down
4 changes: 4 additions & 0 deletions source/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,10 @@ class TitleState extends MusicBeatState
{
super.beatHit();

FlxG.camera.zoom += 0.015;

FlxTween.tween(FlxG.camera, {zoom: 1}, Conductor.crochet / 1200, {ease: FlxEase.quadOut});

if(logoBl != null)
logoBl.animation.play('bump', true);

Expand Down
10 changes: 10 additions & 0 deletions source/editors/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ class ChartingState extends MusicBeatState
player2: 'dad',
gfVersion: 'gf',
songCredit: '',
windowName: '',
event7: '',
event7Value: '',
speed: 1,
Expand Down Expand Up @@ -793,6 +794,7 @@ class ChartingState extends MusicBeatState
}

var creditInputText:FlxUIInputText;
var winNameInputText:FlxUIInputText;
function addSongDataUI():Void //therell be more added here later
{
var tab_group_songdata = new FlxUI(null, UI_box);
Expand All @@ -802,8 +804,14 @@ class ChartingState extends MusicBeatState
blockPressWhileTypingOn.push(creditInputText);
creditInputText.focusGained = () -> FlxG.stage.window.textInputEnabled = true;

winNameInputText = new FlxUIInputText(10, 60, 100, _song.windowName, 8);
blockPressWhileTypingOn.push(winNameInputText);
winNameInputText.focusGained = () -> FlxG.stage.window.textInputEnabled = true;

tab_group_songdata.add(creditInputText);
tab_group_songdata.add(new FlxText(creditInputText.x, creditInputText.y - 15, 0, 'Song Credit:'));
tab_group_songdata.add(winNameInputText);
tab_group_songdata.add(new FlxText(winNameInputText.x, winNameInputText.y - 15, 0, 'Window Name:'));

UI_box.addGroup(tab_group_songdata);
}
Expand Down Expand Up @@ -1984,6 +1992,8 @@ class ChartingState extends MusicBeatState

_song.songCredit = creditInputText.text;

_song.windowName = winNameInputText.text;

if (event7InputText.text == null || event7InputText.text == '') {
_song.event7Value = null;
}
Expand Down

0 comments on commit a180416

Please sign in to comment.