Skip to content

Commit 5226034

Browse files
committed
Update OsuFreeplayState.hx
1 parent 2b6da15 commit 5226034

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

source/states/freeplay/OsuFreeplayState.hx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,27 +424,32 @@ class OsuFreeplayState extends MusicBeatState
424424
}
425425
}
426426

427+
var trueInt:Int = 0;
428+
427429
for (i in 0...FreeplayManager.songList.length)
428430
{
431+
429432

430433
var week:WeekData = WeekData.weeksLoaded.get(WeekData.weeksList[FreeplayManager.songList[i].week]);
431434

432435
var difficulties:Array<String> = Difficulty.loadFromWeek(week);
433436

434437
for (j in 0...difficulties.length)
435438
{
439+
trueInt++;
440+
436441

437442

438443
var songBox:SongBox = new SongBox(320, 100);
439444
songBox.loadGraphic(Paths.image('OSUState/bars/background2'));
440445
songBox.setGraphicSize(650, 100);
441446
songBox.setColorTransform(-1, -1, -1, 1, FreeplayManager.songList[i].color[0][0], FreeplayManager.songList[i].color[0][1], FreeplayManager.songList[i].color[0][2], 1);
442-
songBox.ID = i + j;
447+
songBox.ID = trueInt;
443448
this.songBox.add(songBox);
444449

445450
var icon:HealthIcon = new HealthIcon(FreeplayManager.songList[i].songCharacter, false);
446451
icon.setPosition(320, 100);
447-
icon.ID = i + j;
452+
icon.ID = trueInt;
448453
icon.setGraphicSize(Std.int(icon.width / 1.7), Std.int(icon.height / 1.7));
449454
this.iconGrp.add(icon);
450455

@@ -454,7 +459,7 @@ class OsuFreeplayState extends MusicBeatState
454459
var text:FlxText = new FlxText(0, 0, 500, '', 20);
455460
text.text = FreeplayManager.songList[i].songName + '\n' + difficulties[j];
456461
text.alignment = 'left';
457-
text.ID = i + j;
462+
text.ID = trueInt;
458463
this.textGrp.add(text);
459464
}
460465
}

0 commit comments

Comments
 (0)