Skip to content

Commit

Permalink
stury menuj
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarcleint committed Sep 7, 2022
1 parent 3899820 commit 594a51e
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/preload/weeks/Week SUS.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
]
]
],
"hideStoryMode": false,
"hideStoryMode": true,
"weekName": "Week SUS",
"hiddenUntilUnlocked": false
}
59 changes: 50 additions & 9 deletions source/states/menus/StoryMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class StoryMenuState extends MusicBeatState

var txtWeekTitle:FlxText;
var bgSprite:FlxSprite;
var stSprite:FlxSprite;

private static var curWeek:Int = 0;

Expand All @@ -62,6 +61,21 @@ class StoryMenuState extends MusicBeatState
var leftArrow:FlxSprite;
var rightArrow:FlxSprite;

final weekDescs:Map<String, String> = [
"Week Suicide" => "Description",
"Week Cheddar" => "Description_Cheddar",
"Week Julian" => "Description_Julian"
];

final weekTitles:Map<String, String> = [
"Week Suicide" => "Save the depressed mouse",
"Week Cheddar" => "Father_i_crave_cheddar",
"Week Julian" => "Brick_of_friendship"
];

var description:FlxSprite;
var weekTitle:FlxSprite;

override function create()
{
Lib.application.window.title = "Wednesday's Infidelity - Story Menu";
Expand Down Expand Up @@ -159,16 +173,21 @@ class StoryMenuState extends MusicBeatState
add(leftArrow);
add(rightArrow);

var description:FlxSprite = new FlxSprite().loadGraphic(Paths.image('storymenu/Description', 'preload'));
description.screenCenter();
description.y -= 10;
description.x += 55;
description = new FlxSprite();
add(description);

var savemouse:FlxSprite = new FlxSprite().loadGraphic(Paths.image('storymenu/Save the depressed mouse', 'preload'));
savemouse.screenCenter();
savemouse.y -= 300;
add(savemouse);
weekTitle = new FlxSprite();
add(weekTitle);

// Cache Images

for (map in [weekTitles, weekDescs])
{
for (week => image in map)
{
Paths.image('storymenu/$image', 'preload');
}
}

changeWeek();

Expand Down Expand Up @@ -380,6 +399,28 @@ class StoryMenuState extends MusicBeatState
if (lockedIcon != null)
lockedIcon.alpha = 0;
}

if (weekDescs.exists(leWeek.fileName))
{
description.loadGraphic(Paths.image('storymenu/${weekDescs[leWeek.fileName]}', 'preload'));
description.screenCenter();
description.y -= 10;
description.x += 55;
description.visible = true;
}
else
description.visible = false;

if (weekTitles.exists(leWeek.fileName))
{
weekTitle.loadGraphic(Paths.image('storymenu/${weekTitles[leWeek.fileName]}', 'preload'));
weekTitle.screenCenter();
weekTitle.y -= 300;
weekTitle.visible = true;
}
else
weekTitle.visible = false;

PlayState.storyWeek = curWeek;

CoolUtil.difficulties = CoolUtil.defaultDifficulties.copy();
Expand Down

0 comments on commit 594a51e

Please sign in to comment.