mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-18 21:03:09 +00:00
make main menu bg not go offscreen when selecting options, add offsets for menu items
This commit is contained in:
parent
32452c4180
commit
e96205dfad
|
@ -45,7 +45,7 @@ class MainMenuState extends MusicBeatState
|
|||
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menuBG'));
|
||||
bg.scrollFactor.x = 0;
|
||||
bg.scrollFactor.y = 0.18;
|
||||
bg.scrollFactor.y = 0.17;
|
||||
bg.setGraphicSize(Std.int(bg.width * 1.1));
|
||||
bg.updateHitbox();
|
||||
bg.screenCenter();
|
||||
|
@ -57,7 +57,7 @@ class MainMenuState extends MusicBeatState
|
|||
|
||||
magenta = new FlxSprite(-80).loadGraphic(Paths.image('menuDesat'));
|
||||
magenta.scrollFactor.x = 0;
|
||||
magenta.scrollFactor.y = 0.18;
|
||||
magenta.scrollFactor.y = 0.17;
|
||||
magenta.setGraphicSize(Std.int(magenta.width * 1.1));
|
||||
magenta.updateHitbox();
|
||||
magenta.screenCenter();
|
||||
|
@ -208,11 +208,25 @@ class MainMenuState extends MusicBeatState
|
|||
|
||||
if (spr.ID == curSelected)
|
||||
{
|
||||
spr.animation.play('selected');
|
||||
camFollow.setPosition(spr.getGraphicMidpoint().x, spr.getGraphicMidpoint().y);
|
||||
spr.animation.play('selected');
|
||||
}
|
||||
|
||||
spr.updateHitbox();
|
||||
if(spr.animation.curAnim.name == 'selected')
|
||||
{
|
||||
switch(optionShit[curSelected])
|
||||
{
|
||||
case 'story mode':
|
||||
spr.offset.y += 26;
|
||||
case 'freeplay':
|
||||
spr.offset.y += 28;
|
||||
case 'donate':
|
||||
spr.offset.y += 21;
|
||||
case 'options':
|
||||
spr.offset.y += 26;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue