Merge pull request #1013 from KadeDev/master
WHO THE FUCK DIDN'T FIX THEIR MERGE CONFLICTS BEFORE PUSHING
This commit is contained in:
commit
a4b4aeeaf1
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
import flixel.input.FlxInput;
|
import flixel.input.FlxInput;
|
||||||
import flixel.input.actions.FlxAction;
|
import flixel.input.actions.FlxAction;
|
||||||
@ -571,8 +572,22 @@ class Controls extends FlxActionSet
|
|||||||
//trace(FlxKey.fromString(FlxG.save.data.upBind));
|
//trace(FlxKey.fromString(FlxG.save.data.upBind));
|
||||||
|
|
||||||
removeKeyboard();
|
removeKeyboard();
|
||||||
|
if (gamepadsAdded.length != 0)
|
||||||
|
removeGamepad();
|
||||||
KeyBinds.keyCheck();
|
KeyBinds.keyCheck();
|
||||||
|
|
||||||
|
var buttons = new Map<Control,Array<FlxGamepadInputID>>();
|
||||||
|
|
||||||
|
buttons.set(Control.UP,[FlxGamepadInputID.fromString(FlxG.save.data.gpupBind)]);
|
||||||
|
buttons.set(Control.LEFT,[FlxGamepadInputID.fromString(FlxG.save.data.gpleftBind)]);
|
||||||
|
buttons.set(Control.DOWN,[FlxGamepadInputID.fromString(FlxG.save.data.gpdownBind)]);
|
||||||
|
buttons.set(Control.RIGHT,[FlxGamepadInputID.fromString(FlxG.save.data.gprightBind)]);
|
||||||
|
buttons.set(Control.ACCEPT,[FlxGamepadInputID.A]);
|
||||||
|
buttons.set(Control.BACK,[FlxGamepadInputID.B]);
|
||||||
|
buttons.set(Control.PAUSE,[FlxGamepadInputID.START]);
|
||||||
|
|
||||||
|
addGamepad(0,buttons);
|
||||||
|
|
||||||
inline bindKeys(Control.UP, [FlxKey.fromString(FlxG.save.data.upBind), FlxKey.UP]);
|
inline bindKeys(Control.UP, [FlxKey.fromString(FlxG.save.data.upBind), FlxKey.UP]);
|
||||||
inline bindKeys(Control.DOWN, [FlxKey.fromString(FlxG.save.data.downBind), FlxKey.DOWN]);
|
inline bindKeys(Control.DOWN, [FlxKey.fromString(FlxG.save.data.downBind), FlxKey.DOWN]);
|
||||||
inline bindKeys(Control.LEFT, [FlxKey.fromString(FlxG.save.data.leftBind), FlxKey.LEFT]);
|
inline bindKeys(Control.LEFT, [FlxKey.fromString(FlxG.save.data.leftBind), FlxKey.LEFT]);
|
||||||
@ -599,6 +614,9 @@ class Controls extends FlxActionSet
|
|||||||
|
|
||||||
public function addGamepad(id:Int, ?buttonMap:Map<Control, Array<FlxGamepadInputID>>):Void
|
public function addGamepad(id:Int, ?buttonMap:Map<Control, Array<FlxGamepadInputID>>):Void
|
||||||
{
|
{
|
||||||
|
if (gamepadsAdded.contains(id))
|
||||||
|
gamepadsAdded.remove(id);
|
||||||
|
|
||||||
gamepadsAdded.push(id);
|
gamepadsAdded.push(id);
|
||||||
|
|
||||||
#if (haxe >= "4.0.0")
|
#if (haxe >= "4.0.0")
|
||||||
|
@ -177,7 +177,7 @@ class DialogueBox extends FlxSpriteGroup
|
|||||||
dialogueStarted = true;
|
dialogueStarted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.ANY && dialogueStarted == true)
|
if (PlayerSettings.player1.controls.ACCEPT && dialogueStarted == true)
|
||||||
{
|
{
|
||||||
remove(dialogue);
|
remove(dialogue);
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import flash.text.TextField;
|
import flash.text.TextField;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
@ -184,10 +185,32 @@ class FreeplayState extends MusicBeatState
|
|||||||
scoreText.text = "PERSONAL BEST:" + lerpScore;
|
scoreText.text = "PERSONAL BEST:" + lerpScore;
|
||||||
comboText.text = combo + '\n';
|
comboText.text = combo + '\n';
|
||||||
|
|
||||||
var upP = controls.UP_P;
|
var upP = FlxG.keys.justPressed.UP;
|
||||||
var downP = controls.DOWN_P;
|
var downP = FlxG.keys.justPressed.DOWN;
|
||||||
var accepted = controls.ACCEPT;
|
var accepted = controls.ACCEPT;
|
||||||
|
|
||||||
|
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||||
|
|
||||||
|
if (gamepad != null)
|
||||||
|
{
|
||||||
|
if (gamepad.justPressed.DPAD_UP)
|
||||||
|
{
|
||||||
|
changeSelection(-1);
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_DOWN)
|
||||||
|
{
|
||||||
|
changeSelection(1);
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_LEFT)
|
||||||
|
{
|
||||||
|
changeDiff(-1);
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_RIGHT)
|
||||||
|
{
|
||||||
|
changeDiff(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (upP)
|
if (upP)
|
||||||
{
|
{
|
||||||
changeSelection(-1);
|
changeSelection(-1);
|
||||||
@ -197,9 +220,9 @@ class FreeplayState extends MusicBeatState
|
|||||||
changeSelection(1);
|
changeSelection(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controls.LEFT_P)
|
if (FlxG.keys.justPressed.LEFT)
|
||||||
changeDiff(-1);
|
changeDiff(-1);
|
||||||
if (controls.RIGHT_P)
|
if (FlxG.keys.justPressed.RIGHT)
|
||||||
changeDiff(1);
|
changeDiff(1);
|
||||||
|
|
||||||
if (controls.BACK)
|
if (controls.BACK)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import openfl.Lib;
|
import openfl.Lib;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
|
|
||||||
@ -93,6 +94,10 @@ class KadeEngineData
|
|||||||
if (FlxG.save.data.optimize == null)
|
if (FlxG.save.data.optimize == null)
|
||||||
FlxG.save.data.optimize = false;
|
FlxG.save.data.optimize = false;
|
||||||
|
|
||||||
|
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||||
|
|
||||||
|
KeyBinds.gamepad = gamepad != null;
|
||||||
|
|
||||||
Conductor.recalculateTimings();
|
Conductor.recalculateTimings();
|
||||||
PlayerSettings.player1.controls.loadKeyBinds();
|
PlayerSettings.player1.controls.loadKeyBinds();
|
||||||
KeyBinds.keyCheck();
|
KeyBinds.keyCheck();
|
||||||
|
@ -3,6 +3,7 @@ package;
|
|||||||
/// Code created by Rozebud for FPS Plus (thanks rozebud)
|
/// Code created by Rozebud for FPS Plus (thanks rozebud)
|
||||||
// modified by KadeDev for use in Kade Engine/Tricky
|
// modified by KadeDev for use in Kade Engine/Tricky
|
||||||
|
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import flixel.util.FlxAxes;
|
import flixel.util.FlxAxes;
|
||||||
import flixel.FlxSubState;
|
import flixel.FlxSubState;
|
||||||
import Options.Option;
|
import Options.Option;
|
||||||
@ -36,15 +37,19 @@ class KeyBindMenu extends FlxSubState
|
|||||||
var warningTween:FlxTween;
|
var warningTween:FlxTween;
|
||||||
var keyText:Array<String> = ["LEFT", "DOWN", "UP", "RIGHT"];
|
var keyText:Array<String> = ["LEFT", "DOWN", "UP", "RIGHT"];
|
||||||
var defaultKeys:Array<String> = ["A", "S", "W", "D", "R"];
|
var defaultKeys:Array<String> = ["A", "S", "W", "D", "R"];
|
||||||
|
var defaultGpKeys:Array<String> = ["DPAD_LEFT", "DPAD_DOWN", "DPAD_UP", "DPAD_RIGHT"];
|
||||||
var curSelected:Int = 0;
|
var curSelected:Int = 0;
|
||||||
|
|
||||||
var keys:Array<String> = [FlxG.save.data.leftBind,
|
var keys:Array<String> = [FlxG.save.data.leftBind,
|
||||||
FlxG.save.data.downBind,
|
FlxG.save.data.downBind,
|
||||||
FlxG.save.data.upBind,
|
FlxG.save.data.upBind,
|
||||||
FlxG.save.data.rightBind];
|
FlxG.save.data.rightBind];
|
||||||
|
var gpKeys:Array<String> = [FlxG.save.data.gpleftBind,
|
||||||
|
FlxG.save.data.gpdownBind,
|
||||||
|
FlxG.save.data.gpupBind,
|
||||||
|
FlxG.save.data.gprightBind];
|
||||||
var tempKey:String = "";
|
var tempKey:String = "";
|
||||||
var blacklist:Array<String> = ["ESCAPE", "ENTER", "BACKSPACE", "SPACE"];
|
var blacklist:Array<String> = ["ESCAPE", "ENTER", "BACKSPACE", "SPACE", "TAB"];
|
||||||
|
|
||||||
var blackBox:FlxSprite;
|
var blackBox:FlxSprite;
|
||||||
var infoText:FlxText;
|
var infoText:FlxText;
|
||||||
@ -61,9 +66,16 @@ class KeyBindMenu extends FlxSubState
|
|||||||
keys[i] = defaultKeys[i];
|
keys[i] = defaultKeys[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i in 0...gpKeys.length)
|
||||||
|
{
|
||||||
|
var k = gpKeys[i];
|
||||||
|
if (k == null)
|
||||||
|
gpKeys[i] = defaultGpKeys[i];
|
||||||
|
}
|
||||||
|
|
||||||
//FlxG.sound.playMusic('assets/music/configurator' + TitleState.soundExt);
|
//FlxG.sound.playMusic('assets/music/configurator' + TitleState.soundExt);
|
||||||
|
|
||||||
persistentUpdate = persistentDraw = true;
|
persistentUpdate = true;
|
||||||
|
|
||||||
keyTextDisplay = new FlxText(-10, 0, 1280, "", 72);
|
keyTextDisplay = new FlxText(-10, 0, 1280, "", 72);
|
||||||
keyTextDisplay.scrollFactor.set(0, 0);
|
keyTextDisplay.scrollFactor.set(0, 0);
|
||||||
@ -74,7 +86,7 @@ class KeyBindMenu extends FlxSubState
|
|||||||
blackBox = new FlxSprite(0,0).makeGraphic(FlxG.width,FlxG.height,FlxColor.BLACK);
|
blackBox = new FlxSprite(0,0).makeGraphic(FlxG.width,FlxG.height,FlxColor.BLACK);
|
||||||
add(blackBox);
|
add(blackBox);
|
||||||
|
|
||||||
infoText = new FlxText(-10, 580, 1280, "(Escape to save, backspace to leave without saving)", 72);
|
infoText = new FlxText(-10, 580, 1280, 'Current Mode: ${KeyBinds.gamepad ? 'GAMEPAD' : 'KEYBOARD'}. Press TAB to switch\n(${KeyBinds.gamepad ? 'RIGHT Trigger' : 'Escape'} to save, ${KeyBinds.gamepad ? 'LEFT Trigger' : 'Backspace'} to leave without saving. ${KeyBinds.gamepad ? 'START To change a keybind' : ''})', 72);
|
||||||
infoText.scrollFactor.set(0, 0);
|
infoText.scrollFactor.set(0, 0);
|
||||||
infoText.setFormat("VCR OSD Mono", 24, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
infoText.setFormat("VCR OSD Mono", 24, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
||||||
infoText.borderSize = 2;
|
infoText.borderSize = 2;
|
||||||
@ -98,23 +110,36 @@ class KeyBindMenu extends FlxSubState
|
|||||||
super.create();
|
super.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var frames = 0;
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
|
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||||
|
|
||||||
|
if (frames <= 10)
|
||||||
|
frames++;
|
||||||
|
|
||||||
switch(state){
|
switch(state){
|
||||||
|
|
||||||
case "select":
|
case "select":
|
||||||
if (FlxG.keys.justPressed.UP)
|
if (FlxG.keys.justPressed.UP)
|
||||||
{
|
{
|
||||||
FlxG.sound.play(Paths.sound('scrollMenu'));
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
changeItem(-1);
|
changeItem(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.DOWN)
|
if (FlxG.keys.justPressed.DOWN)
|
||||||
{
|
{
|
||||||
FlxG.sound.play(Paths.sound('scrollMenu'));
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
changeItem(1);
|
changeItem(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.TAB)
|
||||||
|
{
|
||||||
|
KeyBinds.gamepad = !KeyBinds.gamepad;
|
||||||
|
infoText.text = 'Current Mode: ${KeyBinds.gamepad ? 'GAMEPAD' : 'KEYBOARD'}. Press TAB to switch\n(${KeyBinds.gamepad ? 'RIGHT Trigger' : 'Escape'} to save, ${KeyBinds.gamepad ? 'LEFT Trigger' : 'Backspace'} to leave without saving. ${KeyBinds.gamepad ? 'START To change a keybind' : ''})';
|
||||||
|
textUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.ENTER){
|
if (FlxG.keys.justPressed.ENTER){
|
||||||
FlxG.sound.play(Paths.sound('scrollMenu'));
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
@ -123,31 +148,87 @@ class KeyBindMenu extends FlxSubState
|
|||||||
else if(FlxG.keys.justPressed.ESCAPE){
|
else if(FlxG.keys.justPressed.ESCAPE){
|
||||||
quit();
|
quit();
|
||||||
}
|
}
|
||||||
else if (FlxG.keys.justPressed.BACKSPACE){
|
else if (FlxG.keys.justPressed.BACKSPACE){
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
if (gamepad != null) // GP Logic
|
||||||
|
{
|
||||||
|
if (gamepad.justPressed.DPAD_UP)
|
||||||
|
{
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
changeItem(-1);
|
||||||
|
textUpdate();
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_DOWN)
|
||||||
|
{
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
changeItem(1);
|
||||||
|
textUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamepad.justPressed.START && frames > 10){
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
state = "input";
|
||||||
|
}
|
||||||
|
else if(gamepad.justPressed.LEFT_TRIGGER){
|
||||||
|
quit();
|
||||||
|
}
|
||||||
|
else if (gamepad.justPressed.RIGHT_TRIGGER){
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case "input":
|
case "input":
|
||||||
tempKey = keys[curSelected];
|
tempKey = keys[curSelected];
|
||||||
keys[curSelected] = "?";
|
keys[curSelected] = "?";
|
||||||
|
if (KeyBinds.gamepad)
|
||||||
|
gpKeys[curSelected] = "?";
|
||||||
textUpdate();
|
textUpdate();
|
||||||
state = "waiting";
|
state = "waiting";
|
||||||
|
|
||||||
case "waiting":
|
case "waiting":
|
||||||
if(FlxG.keys.justPressed.ESCAPE){
|
if (gamepad != null && KeyBinds.gamepad) // GP Logic
|
||||||
keys[curSelected] = tempKey;
|
{
|
||||||
state = "select";
|
if(FlxG.keys.justPressed.ESCAPE){ // just in case you get stuck
|
||||||
FlxG.sound.play(Paths.sound('confirmMenu'));
|
gpKeys[curSelected] = tempKey;
|
||||||
|
state = "select";
|
||||||
|
FlxG.sound.play(Paths.sound('confirmMenu'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamepad.justPressed.START)
|
||||||
|
{
|
||||||
|
addKeyGamepad(defaultKeys[curSelected]);
|
||||||
|
save();
|
||||||
|
state = "select";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamepad.justPressed.ANY)
|
||||||
|
{
|
||||||
|
trace(gamepad.firstJustPressedID());
|
||||||
|
addKeyGamepad(gamepad.firstJustPressedID());
|
||||||
|
save();
|
||||||
|
state = "select";
|
||||||
|
textUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(FlxG.keys.justPressed.ENTER){
|
else
|
||||||
addKey(defaultKeys[curSelected]);
|
{
|
||||||
save();
|
if(FlxG.keys.justPressed.ESCAPE){
|
||||||
state = "select";
|
keys[curSelected] = tempKey;
|
||||||
}
|
state = "select";
|
||||||
else if(FlxG.keys.justPressed.ANY){
|
FlxG.sound.play(Paths.sound('confirmMenu'));
|
||||||
addKey(FlxG.keys.getIsDown()[0].ID.toString());
|
}
|
||||||
save();
|
else if(FlxG.keys.justPressed.ENTER){
|
||||||
state = "select";
|
addKey(defaultKeys[curSelected]);
|
||||||
|
save();
|
||||||
|
state = "select";
|
||||||
|
}
|
||||||
|
else if(FlxG.keys.justPressed.ANY){
|
||||||
|
addKey(FlxG.keys.getIsDown()[0].ID.toString());
|
||||||
|
save();
|
||||||
|
state = "select";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -170,11 +251,24 @@ class KeyBindMenu extends FlxSubState
|
|||||||
|
|
||||||
keyTextDisplay.text = "\n\n";
|
keyTextDisplay.text = "\n\n";
|
||||||
|
|
||||||
for(i in 0...4){
|
if (KeyBinds.gamepad)
|
||||||
|
{
|
||||||
|
for(i in 0...4){
|
||||||
|
|
||||||
var textStart = (i == curSelected) ? "> " : " ";
|
var textStart = (i == curSelected) ? "> " : " ";
|
||||||
keyTextDisplay.text += textStart + keyText[i] + ": " + ((keys[i] != keyText[i]) ? (keys[i] + " / ") : "" ) + keyText[i] + " ARROW\n";
|
trace(gpKeys[i]);
|
||||||
|
keyTextDisplay.text += textStart + keyText[i] + ": " + gpKeys[i] + "\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(i in 0...4){
|
||||||
|
|
||||||
|
var textStart = (i == curSelected) ? "> " : " ";
|
||||||
|
keyTextDisplay.text += textStart + keyText[i] + ": " + ((keys[i] != keyText[i]) ? (keys[i] + " / ") : "" ) + keyText[i] + " ARROW\n";
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
keyTextDisplay.screenCenter();
|
keyTextDisplay.screenCenter();
|
||||||
@ -188,6 +282,11 @@ class KeyBindMenu extends FlxSubState
|
|||||||
FlxG.save.data.leftBind = keys[0];
|
FlxG.save.data.leftBind = keys[0];
|
||||||
FlxG.save.data.rightBind = keys[3];
|
FlxG.save.data.rightBind = keys[3];
|
||||||
|
|
||||||
|
FlxG.save.data.gpupBind = gpKeys[2];
|
||||||
|
FlxG.save.data.gpdownBind = gpKeys[1];
|
||||||
|
FlxG.save.data.gpleftBind = gpKeys[0];
|
||||||
|
FlxG.save.data.gprightBind = gpKeys[3];
|
||||||
|
|
||||||
FlxG.save.flush();
|
FlxG.save.flush();
|
||||||
|
|
||||||
PlayerSettings.player1.controls.loadKeyBinds();
|
PlayerSettings.player1.controls.loadKeyBinds();
|
||||||
@ -217,6 +316,38 @@ class KeyBindMenu extends FlxSubState
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function addKeyGamepad(r:String){
|
||||||
|
|
||||||
|
var shouldReturn:Bool = true;
|
||||||
|
|
||||||
|
var notAllowed:Array<String> = ["START", "RIGHT_TRIGGER", "LEFT_TRIGGER"];
|
||||||
|
|
||||||
|
for(x in 0...gpKeys.length)
|
||||||
|
{
|
||||||
|
var oK = gpKeys[x];
|
||||||
|
if(oK == r)
|
||||||
|
gpKeys[x] = null;
|
||||||
|
if (notAllowed.contains(oK))
|
||||||
|
{
|
||||||
|
gpKeys[x] = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(shouldReturn){
|
||||||
|
gpKeys[curSelected] = r;
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
gpKeys[curSelected] = tempKey;
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
keyWarning.alpha = 1;
|
||||||
|
warningTween.cancel();
|
||||||
|
warningTween = FlxTween.tween(keyWarning, {alpha: 0}, 0.5, {ease: FlxEase.circOut, startDelay: 2});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function addKey(r:String){
|
function addKey(r:String){
|
||||||
|
|
||||||
var shouldReturn:Bool = true;
|
var shouldReturn:Bool = true;
|
||||||
@ -233,7 +364,10 @@ class KeyBindMenu extends FlxSubState
|
|||||||
if(oK == r)
|
if(oK == r)
|
||||||
keys[x] = null;
|
keys[x] = null;
|
||||||
if (notAllowed.contains(oK))
|
if (notAllowed.contains(oK))
|
||||||
|
{
|
||||||
|
keys[x] = null;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r.contains("NUMPAD"))
|
if (r.contains("NUMPAD"))
|
||||||
|
@ -12,6 +12,8 @@ import flixel.input.keyboard.FlxKey;
|
|||||||
class KeyBinds
|
class KeyBinds
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static var gamepad:Bool = false;
|
||||||
|
|
||||||
public static function resetBinds():Void{
|
public static function resetBinds():Void{
|
||||||
|
|
||||||
FlxG.save.data.upBind = "W";
|
FlxG.save.data.upBind = "W";
|
||||||
@ -19,6 +21,10 @@ class KeyBinds
|
|||||||
FlxG.save.data.leftBind = "A";
|
FlxG.save.data.leftBind = "A";
|
||||||
FlxG.save.data.rightBind = "D";
|
FlxG.save.data.rightBind = "D";
|
||||||
FlxG.save.data.killBind = "R";
|
FlxG.save.data.killBind = "R";
|
||||||
|
FlxG.save.data.gpupBind = "DPAD_UP";
|
||||||
|
FlxG.save.data.gpdownBind = "DPAD_DOWN";
|
||||||
|
FlxG.save.data.gpleftBind = "DPAD_LEFT";
|
||||||
|
FlxG.save.data.gprightBind = "DPAD_RIGHT";
|
||||||
PlayerSettings.player1.controls.loadKeyBinds();
|
PlayerSettings.player1.controls.loadKeyBinds();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -49,9 +55,22 @@ class KeyBinds
|
|||||||
}
|
}
|
||||||
if (StringTools.contains(FlxG.save.data.rightBind,"NUMPAD"))
|
if (StringTools.contains(FlxG.save.data.rightBind,"NUMPAD"))
|
||||||
FlxG.save.data.rightBind = "D";
|
FlxG.save.data.rightBind = "D";
|
||||||
if(FlxG.save.data.killBind == null){
|
|
||||||
FlxG.save.data.killBind = "R";
|
if(FlxG.save.data.gpupBind == null){
|
||||||
trace("No KILL");
|
FlxG.save.data.gpupBind = "DPAD_UP";
|
||||||
|
trace("No GUP");
|
||||||
|
}
|
||||||
|
if(FlxG.save.data.gpdownBind == null){
|
||||||
|
FlxG.save.data.gpdownBind = "DPAD_DOWN";
|
||||||
|
trace("No GDOWN");
|
||||||
|
}
|
||||||
|
if(FlxG.save.data.gpleftBind == null){
|
||||||
|
FlxG.save.data.gpleftBind = "DPAD_LEFT";
|
||||||
|
trace("No GLEFT");
|
||||||
|
}
|
||||||
|
if(FlxG.save.data.gprightBind == null){
|
||||||
|
FlxG.save.data.gprightBind = "DPAD_RIGHT";
|
||||||
|
trace("No GRIGHT");
|
||||||
}
|
}
|
||||||
|
|
||||||
trace('${FlxG.save.data.leftBind}-${FlxG.save.data.downBind}-${FlxG.save.data.upBind}-${FlxG.save.data.rightBind}');
|
trace('${FlxG.save.data.leftBind}-${FlxG.save.data.downBind}-${FlxG.save.data.upBind}-${FlxG.save.data.rightBind}');
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import Controls.KeyboardScheme;
|
import Controls.KeyboardScheme;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
import flixel.FlxObject;
|
import flixel.FlxObject;
|
||||||
@ -144,13 +145,29 @@ class MainMenuState extends MusicBeatState
|
|||||||
|
|
||||||
if (!selectedSomethin)
|
if (!selectedSomethin)
|
||||||
{
|
{
|
||||||
if (controls.UP_P)
|
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||||
|
|
||||||
|
if (gamepad != null)
|
||||||
|
{
|
||||||
|
if (gamepad.justPressed.DPAD_UP)
|
||||||
|
{
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
changeItem(-1);
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_DOWN)
|
||||||
|
{
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
changeItem(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.UP)
|
||||||
{
|
{
|
||||||
FlxG.sound.play(Paths.sound('scrollMenu'));
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
changeItem(-1);
|
changeItem(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controls.DOWN_P)
|
if (FlxG.keys.justPressed.DOWN)
|
||||||
{
|
{
|
||||||
FlxG.sound.play(Paths.sound('scrollMenu'));
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
changeItem(1);
|
changeItem(1);
|
||||||
|
@ -317,10 +317,10 @@ class Judgement extends Option
|
|||||||
|
|
||||||
override function getValue():String {
|
override function getValue():String {
|
||||||
return "Safe Frames: " + Conductor.safeFrames +
|
return "Safe Frames: " + Conductor.safeFrames +
|
||||||
" - SIK: " + HelperFunctions.truncateFloat(22 * Conductor.timeScale, 0) +
|
" - SIK: " + HelperFunctions.truncateFloat(45 * Conductor.timeScale, 0) +
|
||||||
"ms GD: " + HelperFunctions.truncateFloat(45 * Conductor.timeScale, 0) +
|
"ms GD: " + HelperFunctions.truncateFloat(90 * Conductor.timeScale, 0) +
|
||||||
"ms BD: " + HelperFunctions.truncateFloat(135 * Conductor.timeScale, 0) +
|
"ms BD: " + HelperFunctions.truncateFloat(135 * Conductor.timeScale, 0) +
|
||||||
"ms SHT: " + HelperFunctions.truncateFloat(155 * Conductor.timeScale, 0) +
|
"ms SHT: " + HelperFunctions.truncateFloat(166 * Conductor.timeScale, 0) +
|
||||||
"ms TOTAL: " + HelperFunctions.truncateFloat(Conductor.safeZoneOffset,0) + "ms";
|
"ms TOTAL: " + HelperFunctions.truncateFloat(Conductor.safeZoneOffset,0) + "ms";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import flixel.tweens.FlxEase;
|
import flixel.tweens.FlxEase;
|
||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
import openfl.Lib;
|
import openfl.Lib;
|
||||||
@ -144,9 +145,26 @@ class OptionsMenu extends MusicBeatState
|
|||||||
|
|
||||||
changeSelection(curSelected);
|
changeSelection(curSelected);
|
||||||
}
|
}
|
||||||
if (controls.UP_P)
|
|
||||||
|
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||||
|
|
||||||
|
if (gamepad != null)
|
||||||
|
{
|
||||||
|
if (gamepad.justPressed.DPAD_UP)
|
||||||
|
{
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
changeSelection(-1);
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_DOWN)
|
||||||
|
{
|
||||||
|
FlxG.sound.play(Paths.sound('scrollMenu'));
|
||||||
|
changeSelection(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.UP)
|
||||||
changeSelection(-1);
|
changeSelection(-1);
|
||||||
if (controls.DOWN_P)
|
if (FlxG.keys.justPressed.DOWN)
|
||||||
changeSelection(1);
|
changeSelection(1);
|
||||||
|
|
||||||
if (isCat)
|
if (isCat)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import openfl.Lib;
|
import openfl.Lib;
|
||||||
#if windows
|
#if windows
|
||||||
import llua.Lua;
|
import llua.Lua;
|
||||||
@ -108,6 +109,8 @@ class PauseSubState extends MusicBeatSubstate
|
|||||||
if (PlayState.instance.useVideo)
|
if (PlayState.instance.useVideo)
|
||||||
menuItems.remove('Resume');
|
menuItems.remove('Resume');
|
||||||
|
|
||||||
|
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||||
|
|
||||||
var upP = controls.UP_P;
|
var upP = controls.UP_P;
|
||||||
var downP = controls.DOWN_P;
|
var downP = controls.DOWN_P;
|
||||||
var leftP = controls.LEFT_P;
|
var leftP = controls.LEFT_P;
|
||||||
@ -115,6 +118,14 @@ class PauseSubState extends MusicBeatSubstate
|
|||||||
var accepted = controls.ACCEPT;
|
var accepted = controls.ACCEPT;
|
||||||
var oldOffset:Float = 0;
|
var oldOffset:Float = 0;
|
||||||
|
|
||||||
|
if (gamepad != null && KeyBinds.gamepad)
|
||||||
|
{
|
||||||
|
upP = gamepad.justPressed.DPAD_UP;
|
||||||
|
downP = gamepad.justPressed.DPAD_DOWN;
|
||||||
|
leftP = gamepad.justPressed.DPAD_LEFT;
|
||||||
|
rightP = gamepad.justPressed.DPAD_RIGHT;
|
||||||
|
}
|
||||||
|
|
||||||
// pre lowercasing the song name (update)
|
// pre lowercasing the song name (update)
|
||||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
switch (songLowercase) {
|
switch (songLowercase) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import openfl.ui.KeyLocation;
|
||||||
import openfl.events.Event;
|
import openfl.events.Event;
|
||||||
import haxe.EnumTools;
|
import haxe.EnumTools;
|
||||||
import openfl.ui.Keyboard;
|
import openfl.ui.Keyboard;
|
||||||
@ -998,11 +999,7 @@ class PlayState extends MusicBeatState
|
|||||||
add(healthBar);
|
add(healthBar);
|
||||||
|
|
||||||
// Add Kade Engine watermark
|
// Add Kade Engine watermark
|
||||||
<<<<<<< HEAD
|
|
||||||
kadeEngineWatermark = new FlxText(4,healthBarBG.y + 50,0,SONG.song + " " + CoolUtil.difficultyFromInt(storyDifficulty) + (Main.watermarks ? " - KE " + MainMenuState.kadeEngineVer : ""), 16);
|
|
||||||
=======
|
|
||||||
kadeEngineWatermark = new FlxText(4,healthBarBG.y + 50,0,SONG.song + " - " + CoolUtil.difficultyFromInt(storyDifficulty) + (Main.watermarks ? " | KE " + MainMenuState.kadeEngineVer : ""), 16);
|
kadeEngineWatermark = new FlxText(4,healthBarBG.y + 50,0,SONG.song + " - " + CoolUtil.difficultyFromInt(storyDifficulty) + (Main.watermarks ? " | KE " + MainMenuState.kadeEngineVer : ""), 16);
|
||||||
>>>>>>> origin/master
|
|
||||||
kadeEngineWatermark.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);
|
kadeEngineWatermark.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);
|
||||||
kadeEngineWatermark.scrollFactor.set();
|
kadeEngineWatermark.scrollFactor.set();
|
||||||
add(kadeEngineWatermark);
|
add(kadeEngineWatermark);
|
||||||
@ -1403,6 +1400,10 @@ class PlayState extends MusicBeatState
|
|||||||
data = i;
|
data = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (evt.keyLocation == KeyLocation.NUM_PAD)
|
||||||
|
{
|
||||||
|
trace(String.fromCharCode(evt.charCode) + " " + key);
|
||||||
|
}
|
||||||
|
|
||||||
if (data == -1)
|
if (data == -1)
|
||||||
return;
|
return;
|
||||||
@ -3118,7 +3119,7 @@ class PlayState extends MusicBeatState
|
|||||||
var rightHold:Bool = false;
|
var rightHold:Bool = false;
|
||||||
var leftHold:Bool = false;
|
var leftHold:Bool = false;
|
||||||
|
|
||||||
// THIS FUNCTION JUST FUCKS WIT HELD NOTES AND BOTPLAY/REPLAY
|
// THIS FUNCTION JUST FUCKS WIT HELD NOTES AND BOTPLAY/REPLAY (also gamepad shit)
|
||||||
|
|
||||||
private function keyShit():Void // I've invested in emma stocks
|
private function keyShit():Void // I've invested in emma stocks
|
||||||
{
|
{
|
||||||
@ -3144,10 +3145,7 @@ class PlayState extends MusicBeatState
|
|||||||
if (controls.RIGHT_P){luaModchart.executeState('keyPressed',["right"]);};
|
if (controls.RIGHT_P){luaModchart.executeState('keyPressed',["right"]);};
|
||||||
};
|
};
|
||||||
#end
|
#end
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
|
||||||
// Prevent player input if botplay is on
|
// Prevent player input if botplay is on
|
||||||
if(PlayStateChangeables.botPlay)
|
if(PlayStateChangeables.botPlay)
|
||||||
@ -3159,15 +3157,9 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
var anas:Array<Ana> = [null,null,null,null];
|
var anas:Array<Ana> = [null,null,null,null];
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
for (i in 0...pressArray.length)
|
for (i in 0...pressArray.length)
|
||||||
if (pressArray[i])
|
if (pressArray[i])
|
||||||
anas[i] = new Ana(Conductor.songPosition, null, false, "miss", i);
|
anas[i] = new Ana(Conductor.songPosition, null, false, "miss", i);
|
||||||
=======
|
|
||||||
/*for (i in 0...pressArray.length)
|
|
||||||
if (pressArray[i])
|
|
||||||
anas[i] = new Ana(Conductor.songPosition, null, false, "miss", i);*/
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
|
||||||
// HOLDS, check for sustain notes
|
// HOLDS, check for sustain notes
|
||||||
if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
|
if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
|
||||||
@ -3179,118 +3171,80 @@ class PlayState extends MusicBeatState
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// PRESSES, check for note hits
|
if (KeyBinds.gamepad && !FlxG.keys.justPressed.ANY)
|
||||||
/*if (pressArray.contains(true) && generatedMusic)
|
|
||||||
{
|
{
|
||||||
boyfriend.holdTimer = 0;
|
// PRESSES, check for note hits
|
||||||
|
if (pressArray.contains(true) && generatedMusic)
|
||||||
var possibleNotes:Array<Note> = []; // notes that can be hit
|
|
||||||
var directionList:Array<Int> = []; // directions that can be hit
|
|
||||||
var dumbNotes:Array<Note> = []; // notes to kill later
|
|
||||||
var directionsAccounted:Array<Bool> = [false,false,false,false]; // we don't want to do judgments for more than one presses
|
|
||||||
|
|
||||||
notes.forEachAlive(function(daNote:Note)
|
|
||||||
{
|
{
|
||||||
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
|
boyfriend.holdTimer = 0;
|
||||||
|
|
||||||
|
var possibleNotes:Array<Note> = []; // notes that can be hit
|
||||||
|
var directionList:Array<Int> = []; // directions that can be hit
|
||||||
|
var dumbNotes:Array<Note> = []; // notes to kill later
|
||||||
|
var directionsAccounted:Array<Bool> = [false,false,false,false]; // we don't want to do judgments for more than one presses
|
||||||
|
|
||||||
|
notes.forEachAlive(function(daNote:Note)
|
||||||
{
|
{
|
||||||
if (!directionsAccounted[daNote.noteData])
|
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
if (!directionsAccounted[daNote.noteData])
|
||||||
directionsAccounted[daNote.noteData] = true;
|
{
|
||||||
possibleNotes.push(daNote);
|
directionsAccounted[daNote.noteData] = true;
|
||||||
directionList.push(daNote.noteData);
|
possibleNotes.push(daNote);
|
||||||
=======
|
directionList.push(daNote.noteData);
|
||||||
if (directionList.contains(daNote.noteData))
|
|
||||||
{
|
|
||||||
directionsAccounted[daNote.noteData] = true;
|
|
||||||
for (coolNote in possibleNotes)
|
|
||||||
{
|
|
||||||
if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
|
|
||||||
{ // if it's the same note twice at < 10ms distance, just delete it
|
|
||||||
// EXCEPT u cant delete it in this loop cuz it fucks with the collection lol
|
|
||||||
dumbNotes.push(daNote);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime)
|
|
||||||
{ // if daNote is earlier than existing note (coolNote), replace
|
|
||||||
possibleNotes.remove(coolNote);
|
|
||||||
possibleNotes.push(daNote);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
possibleNotes.push(daNote);
|
|
||||||
directionList.push(daNote.noteData);
|
|
||||||
}
|
|
||||||
>>>>>>> origin/master
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
trace('notes that can be hit: ' + possibleNotes.length);
|
|
||||||
|
|
||||||
for (note in dumbNotes)
|
|
||||||
{
|
|
||||||
FlxG.log.add("killing dumb ass note at " + note.strumTime);
|
|
||||||
note.kill();
|
|
||||||
notes.remove(note, true);
|
|
||||||
note.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
|
|
||||||
|
|
||||||
if (perfectMode)
|
|
||||||
goodNoteHit(possibleNotes[0]);
|
|
||||||
else if (possibleNotes.length > 0)
|
|
||||||
{
|
|
||||||
if (!FlxG.save.data.ghost)
|
|
||||||
{
|
|
||||||
for (shit in 0...pressArray.length)
|
|
||||||
{ // if a direction is hit that shouldn't be
|
|
||||||
if (pressArray[shit] && !directionList.contains(shit))
|
|
||||||
noteMiss(shit, null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (coolNote in possibleNotes)
|
});
|
||||||
|
trace('notes that can be hit: ' + possibleNotes.length);
|
||||||
|
for (note in dumbNotes)
|
||||||
{
|
{
|
||||||
if (pressArray[coolNote.noteData])
|
FlxG.log.add("killing dumb ass note at " + note.strumTime);
|
||||||
|
note.kill();
|
||||||
|
notes.remove(note, true);
|
||||||
|
note.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
|
||||||
|
if (perfectMode)
|
||||||
|
goodNoteHit(possibleNotes[0]);
|
||||||
|
else if (possibleNotes.length > 0)
|
||||||
|
{
|
||||||
|
if (!FlxG.save.data.ghost)
|
||||||
{
|
{
|
||||||
if (mashViolations != 0)
|
for (shit in 0...pressArray.length)
|
||||||
mashViolations--;
|
{ // if a direction is hit that shouldn't be
|
||||||
scoreTxt.color = FlxColor.WHITE;
|
if (pressArray[shit] && !directionList.contains(shit))
|
||||||
var noteDiff:Float = -(coolNote.strumTime - Conductor.songPosition);
|
noteMiss(shit, null);
|
||||||
anas[coolNote.noteData].hit = true;
|
}
|
||||||
anas[coolNote.noteData].hitJudge = Ratings.CalculateRating(noteDiff, Math.floor((PlayStateChangeables.safeFrames / 60) * 1000));
|
}
|
||||||
anas[coolNote.noteData].nearestNote = [coolNote.strumTime,coolNote.noteData,coolNote.sustainLength];
|
for (coolNote in possibleNotes)
|
||||||
goodNoteHit(coolNote);
|
{
|
||||||
|
if (pressArray[coolNote.noteData])
|
||||||
|
{
|
||||||
|
if (mashViolations != 0)
|
||||||
|
mashViolations--;
|
||||||
|
scoreTxt.color = FlxColor.WHITE;
|
||||||
|
var noteDiff:Float = -(coolNote.strumTime - Conductor.songPosition);
|
||||||
|
anas[coolNote.noteData].hit = true;
|
||||||
|
anas[coolNote.noteData].hitJudge = Ratings.CalculateRating(noteDiff, Math.floor((PlayStateChangeables.safeFrames / 60) * 1000));
|
||||||
|
anas[coolNote.noteData].nearestNote = [coolNote.strumTime,coolNote.noteData,coolNote.sustainLength];
|
||||||
|
goodNoteHit(coolNote);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!FlxG.save.data.ghost)
|
||||||
|
{
|
||||||
|
for (shit in 0...pressArray.length)
|
||||||
|
if (pressArray[shit])
|
||||||
|
noteMiss(shit, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!FlxG.save.data.ghost)
|
|
||||||
{
|
|
||||||
for (shit in 0...pressArray.length)
|
|
||||||
if (pressArray[shit])
|
|
||||||
noteMiss(shit, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
if (!loadRep)
|
||||||
|
for (i in anas)
|
||||||
|
if (i != null)
|
||||||
|
replayAna.anaArray.push(i); // put em all there
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!loadRep)
|
|
||||||
for (i in anas)
|
|
||||||
if (i != null)
|
|
||||||
replayAna.anaArray.push(i); // put em all there
|
|
||||||
=======
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*if (!loadRep)
|
|
||||||
for (i in anas)
|
|
||||||
if (i != null)
|
|
||||||
replayAna.anaArray.push(i); // put em all there*/
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
|
||||||
notes.forEachAlive(function(daNote:Note)
|
notes.forEachAlive(function(daNote:Note)
|
||||||
{
|
{
|
||||||
if(PlayStateChangeables.useDownscroll && daNote.y > strumLine.y ||
|
if(PlayStateChangeables.useDownscroll && daNote.y > strumLine.y ||
|
||||||
|
@ -82,7 +82,7 @@ class ResultsScreen extends FlxSubState
|
|||||||
comboText.scrollFactor.set();
|
comboText.scrollFactor.set();
|
||||||
add(comboText);
|
add(comboText);
|
||||||
|
|
||||||
contText = new FlxText(FlxG.width - 475,FlxG.height + 50,0,'Press ENTER to continue.');
|
contText = new FlxText(FlxG.width - 475,FlxG.height + 50,0,'Press ${KeyBinds.gamepad ? 'A' : 'ENTER'} to continue.');
|
||||||
contText.size = 28;
|
contText.size = 28;
|
||||||
contText.setBorderStyle(FlxTextBorderStyle.OUTLINE,FlxColor.BLACK,4,1);
|
contText.setBorderStyle(FlxTextBorderStyle.OUTLINE,FlxColor.BLACK,4,1);
|
||||||
contText.color = FlxColor.WHITE;
|
contText.color = FlxColor.WHITE;
|
||||||
@ -172,7 +172,7 @@ class ResultsScreen extends FlxSubState
|
|||||||
|
|
||||||
// keybinds
|
// keybinds
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.ENTER)
|
if (PlayerSettings.player1.controls.ACCEPT)
|
||||||
{
|
{
|
||||||
music.fadeOut(0.3);
|
music.fadeOut(0.3);
|
||||||
|
|
||||||
@ -199,12 +199,6 @@ class ResultsScreen extends FlxSubState
|
|||||||
FlxG.switchState(new FreeplayState());
|
FlxG.switchState(new FreeplayState());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.EIGHT)
|
|
||||||
{
|
|
||||||
graph.showInput = !graph.showInput;
|
|
||||||
graph.update();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.F1)
|
if (FlxG.keys.justPressed.F1)
|
||||||
{
|
{
|
||||||
trace(PlayState.rep.path);
|
trace(PlayState.rep.path);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.addons.transition.FlxTransitionableState;
|
import flixel.addons.transition.FlxTransitionableState;
|
||||||
@ -222,12 +223,44 @@ class StoryMenuState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
if (!selectedWeek)
|
if (!selectedWeek)
|
||||||
{
|
{
|
||||||
if (controls.UP_P)
|
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||||
|
|
||||||
|
if (gamepad != null)
|
||||||
|
{
|
||||||
|
if (gamepad.justPressed.DPAD_UP)
|
||||||
|
{
|
||||||
|
changeWeek(-1);
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_DOWN)
|
||||||
|
{
|
||||||
|
changeWeek(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamepad.pressed.DPAD_RIGHT)
|
||||||
|
rightArrow.animation.play('press')
|
||||||
|
else
|
||||||
|
rightArrow.animation.play('idle');
|
||||||
|
if (gamepad.pressed.DPAD_LEFT)
|
||||||
|
leftArrow.animation.play('press');
|
||||||
|
else
|
||||||
|
leftArrow.animation.play('idle');
|
||||||
|
|
||||||
|
if (gamepad.justPressed.DPAD_RIGHT)
|
||||||
|
{
|
||||||
|
changeDifficulty(1);
|
||||||
|
}
|
||||||
|
if (gamepad.justPressed.DPAD_LEFT)
|
||||||
|
{
|
||||||
|
changeDifficulty(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.UP)
|
||||||
{
|
{
|
||||||
changeWeek(-1);
|
changeWeek(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controls.DOWN_P)
|
if (FlxG.keys.justPressed.DOWN)
|
||||||
{
|
{
|
||||||
changeWeek(1);
|
changeWeek(1);
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,8 @@ class TitleState extends MusicBeatState
|
|||||||
|
|
||||||
curWacky = FlxG.random.getObject(getIntroTextShit());
|
curWacky = FlxG.random.getObject(getIntroTextShit());
|
||||||
|
|
||||||
|
trace('hello');
|
||||||
|
|
||||||
// DEBUG BULLSHIT
|
// DEBUG BULLSHIT
|
||||||
|
|
||||||
super.create();
|
super.create();
|
||||||
@ -277,7 +279,7 @@ class TitleState extends MusicBeatState
|
|||||||
FlxG.fullscreen = !FlxG.fullscreen;
|
FlxG.fullscreen = !FlxG.fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pressedEnter:Bool = FlxG.keys.justPressed.ENTER;
|
var pressedEnter:Bool = controls.ACCEPT;
|
||||||
|
|
||||||
#if mobile
|
#if mobile
|
||||||
for (touch in FlxG.touches.list)
|
for (touch in FlxG.touches.list)
|
||||||
@ -289,19 +291,6 @@ class TitleState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
|
||||||
|
|
||||||
if (gamepad != null)
|
|
||||||
{
|
|
||||||
if (gamepad.justPressed.START)
|
|
||||||
pressedEnter = true;
|
|
||||||
|
|
||||||
#if switch
|
|
||||||
if (gamepad.justPressed.B)
|
|
||||||
pressedEnter = true;
|
|
||||||
#end
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pressedEnter && !transitioning && skippedIntro)
|
if (pressedEnter && !transitioning && skippedIntro)
|
||||||
{
|
{
|
||||||
#if !switch
|
#if !switch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user