senpai and roses on easy
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+1
-5181
File diff suppressed because one or more lines are too long
+34
-5
@@ -1,10 +1,12 @@
|
||||
package;
|
||||
|
||||
import Controls.Control;
|
||||
import flash.text.TextField;
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.addons.display.FlxGridOverlay;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
import flixel.input.keyboard.FlxKey;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.util.FlxColor;
|
||||
@@ -12,7 +14,6 @@ import lime.utils.Assets;
|
||||
|
||||
class OptionsMenu extends MusicBeatState
|
||||
{
|
||||
|
||||
var selector:FlxText;
|
||||
var curSelected:Int = 0;
|
||||
|
||||
@@ -36,7 +37,8 @@ class OptionsMenu extends MusicBeatState
|
||||
|
||||
for (i in 0...controlsStrings.length)
|
||||
{
|
||||
if(controlsStrings[i].indexOf('set') != -1){
|
||||
if (controlsStrings[i].indexOf('set') != -1)
|
||||
{
|
||||
var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, controlsStrings[i].substring(3) + ': ' + controlsStrings[i + 1], true, false);
|
||||
controlLabel.isMenuItem = true;
|
||||
controlLabel.targetY = i;
|
||||
@@ -52,13 +54,41 @@ class OptionsMenu extends MusicBeatState
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
||||
if (controls.ACCEPT)
|
||||
{
|
||||
changeBinding();
|
||||
}
|
||||
|
||||
if (isSettingControl)
|
||||
waitingInput();
|
||||
else
|
||||
{
|
||||
if (controls.BACK)
|
||||
FlxG.switchState(new MainMenuState());
|
||||
if (controls.UP_P)
|
||||
changeSelection(-1);
|
||||
if (controls.DOWN_P)
|
||||
changeSelection(1);
|
||||
}
|
||||
}
|
||||
|
||||
function waitingInput():Void
|
||||
{
|
||||
if (FlxG.keys.getIsDown().length > 0)
|
||||
{
|
||||
PlayerSettings.player1.controls.replaceBinding(Control.LEFT, Keys, FlxG.keys.getIsDown()[0].ID, null);
|
||||
}
|
||||
// PlayerSettings.player1.controls.replaceBinding(Control)
|
||||
}
|
||||
|
||||
var isSettingControl:Bool = false;
|
||||
|
||||
function changeBinding():Void
|
||||
{
|
||||
if (!isSettingControl)
|
||||
{
|
||||
isSettingControl = true;
|
||||
}
|
||||
}
|
||||
|
||||
function changeSelection(change:Int = 0)
|
||||
@@ -72,8 +102,8 @@ class OptionsMenu extends MusicBeatState
|
||||
curSelected += change;
|
||||
|
||||
if (curSelected < 0)
|
||||
curSelected = controlsStrings.length - 1;
|
||||
if (curSelected >= controlsStrings.length)
|
||||
curSelected = grpControls.length - 1;
|
||||
if (curSelected >= grpControls.length)
|
||||
curSelected = 0;
|
||||
|
||||
// selector.y = (70 * curSelected) + 30;
|
||||
@@ -95,5 +125,4 @@ class OptionsMenu extends MusicBeatState
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user