Unhardcode Noteskins, gfVersion, and Stages
YOOOOOOOOO
This commit is contained in:
@ -88,6 +88,9 @@ class ChartingState extends MusicBeatState
|
||||
var leftIcon:HealthIcon;
|
||||
var rightIcon:HealthIcon;
|
||||
|
||||
var leftIconChar:String;
|
||||
var rightIconChar:String;
|
||||
|
||||
private var lastNote:Note;
|
||||
|
||||
|
||||
@ -95,11 +98,31 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
curSection = lastSection;
|
||||
|
||||
if (PlayState.SONG != null)
|
||||
_song = PlayState.SONG;
|
||||
else
|
||||
{
|
||||
_song = {
|
||||
song: 'Test',
|
||||
notes: [],
|
||||
bpm: 150,
|
||||
needsVoices: true,
|
||||
player1: 'bf',
|
||||
player2: 'dad',
|
||||
gfVersion: 'gf',
|
||||
noteStyle: 'normal',
|
||||
stage: 'stage',
|
||||
speed: 1,
|
||||
validScore: false
|
||||
};
|
||||
}
|
||||
|
||||
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16);
|
||||
add(gridBG);
|
||||
|
||||
leftIcon = new HealthIcon('bf');
|
||||
rightIcon = new HealthIcon('dad');
|
||||
leftIconChar = _song.player1;
|
||||
rightIconChar = _song.player2;
|
||||
leftIcon = new HealthIcon(leftIconChar);
|
||||
rightIcon = new HealthIcon(rightIconChar);
|
||||
leftIcon.scrollFactor.set(1, 1);
|
||||
rightIcon.scrollFactor.set(1, 1);
|
||||
|
||||
@ -118,22 +141,6 @@ class ChartingState extends MusicBeatState
|
||||
curRenderedNotes = new FlxTypedGroup<Note>();
|
||||
curRenderedSustains = new FlxTypedGroup<FlxSprite>();
|
||||
|
||||
if (PlayState.SONG != null)
|
||||
_song = PlayState.SONG;
|
||||
else
|
||||
{
|
||||
_song = {
|
||||
song: 'Test',
|
||||
notes: [],
|
||||
bpm: 150,
|
||||
needsVoices: true,
|
||||
player1: 'bf',
|
||||
player2: 'dad',
|
||||
speed: 1,
|
||||
validScore: false
|
||||
};
|
||||
}
|
||||
|
||||
FlxG.mouse.visible = true;
|
||||
FlxG.save.bind('funkin', 'ninjamuffin99');
|
||||
|
||||
@ -162,7 +169,8 @@ class ChartingState extends MusicBeatState
|
||||
var tabs = [
|
||||
{name: "Song", label: 'Song'},
|
||||
{name: "Section", label: 'Section'},
|
||||
{name: "Note", label: 'Note'}
|
||||
{name: "Note", label: 'Note'},
|
||||
{name: "Assets", label: 'Assets'}
|
||||
];
|
||||
|
||||
UI_box = new FlxUITabMenu(null, tabs, true);
|
||||
@ -247,6 +255,9 @@ class ChartingState extends MusicBeatState
|
||||
stepperBPM.name = 'song_bpm';
|
||||
|
||||
var characters:Array<String> = CoolUtil.coolTextFile(Paths.txt('characterList'));
|
||||
var gfVersions:Array<String> = CoolUtil.coolTextFile(Paths.txt('gfVersionList'));
|
||||
var stages:Array<String> = CoolUtil.coolTextFile(Paths.txt('stageList'));
|
||||
var noteStyles:Array<String> = CoolUtil.coolTextFile(Paths.txt('noteStyleList'));
|
||||
|
||||
var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String)
|
||||
{
|
||||
@ -261,6 +272,24 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
player2DropDown.selectedLabel = _song.player2;
|
||||
|
||||
var gfVersionDropDown = new FlxUIDropDownMenu(10, 200, FlxUIDropDownMenu.makeStrIdLabelArray(gfVersions, true), function(gfVersion:String)
|
||||
{
|
||||
_song.gfVersion = gfVersions[Std.parseInt(gfVersion)];
|
||||
});
|
||||
gfVersionDropDown.selectedLabel = _song.gfVersion;
|
||||
|
||||
var stageDropDown = new FlxUIDropDownMenu(140, 200, FlxUIDropDownMenu.makeStrIdLabelArray(stages, true), function(stage:String)
|
||||
{
|
||||
_song.stage = stages[Std.parseInt(stage)];
|
||||
});
|
||||
stageDropDown.selectedLabel = _song.stage;
|
||||
|
||||
var noteStyleDropDown = new FlxUIDropDownMenu(10, 300, FlxUIDropDownMenu.makeStrIdLabelArray(noteStyles, true), function(noteStyle:String)
|
||||
{
|
||||
_song.noteStyle = noteStyles[Std.parseInt(noteStyle)];
|
||||
});
|
||||
noteStyleDropDown.selectedLabel = _song.noteStyle;
|
||||
|
||||
var tab_group_song = new FlxUI(null, UI_box);
|
||||
tab_group_song.name = "Song";
|
||||
tab_group_song.add(UI_songTitle);
|
||||
@ -273,10 +302,20 @@ class ChartingState extends MusicBeatState
|
||||
tab_group_song.add(loadAutosaveBtn);
|
||||
tab_group_song.add(stepperBPM);
|
||||
tab_group_song.add(stepperSpeed);
|
||||
tab_group_song.add(player1DropDown);
|
||||
tab_group_song.add(player2DropDown);
|
||||
|
||||
var tab_group_assets = new FlxUI(null, UI_box);
|
||||
tab_group_assets.name = "Assets";
|
||||
tab_group_assets.add(player1DropDown);
|
||||
tab_group_assets.add(player2DropDown);
|
||||
tab_group_assets.add(gfVersionDropDown);
|
||||
tab_group_assets.add(stageDropDown);
|
||||
tab_group_assets.add(noteStyleDropDown);
|
||||
|
||||
|
||||
|
||||
|
||||
UI_box.addGroup(tab_group_song);
|
||||
UI_box.addGroup(tab_group_assets);
|
||||
UI_box.scrollFactor.set();
|
||||
|
||||
FlxG.camera.follow(strumLine);
|
||||
@ -991,13 +1030,13 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
if (check_mustHitSection.checked)
|
||||
{
|
||||
leftIcon.animation.play('bf');
|
||||
rightIcon.animation.play('dad');
|
||||
leftIcon.animation.play(leftIconChar);
|
||||
rightIcon.animation.play(rightIconChar);
|
||||
}
|
||||
else
|
||||
{
|
||||
leftIcon.animation.play('dad');
|
||||
rightIcon.animation.play('bf');
|
||||
leftIcon.animation.play(rightIconChar);
|
||||
rightIcon.animation.play(leftIconChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user