Skip to content

Commit

Permalink
Update Input.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Nov 11, 2024
1 parent bcbc98f commit 26be58d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/backend/Input.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ class Input {

if (gamepad != null) {
if (binds.exists(tag)) {
for (i in binds[tag].gamepad)
if (i != FlxGamepadInputID.NONE && gamepad.checkStatus(binds[tag].gamepad[i], state))
for (i in 0...binds[tag].gamepad.length)
if (gamepad.checkStatus(binds[tag].gamepad[i], state))
return true;
} else {
if (gamepad.checkStatus(FlxGamepadInputID.fromString(tag), state))
return true;
}
} else {
if (binds.exists(tag)) {
for (i in binds[tag].key)
if (i != FlxKey.NONE && FlxG.keys.checkStatus(binds[tag].key[i], state))
for (i in 0...binds[tag].key.length)
if (FlxG.keys.checkStatus(binds[tag].key[i], state))
return true;
} else {
if (FlxG.keys.checkStatus(FlxKey.fromString(tag), state))
Expand All @@ -95,17 +95,17 @@ class Input {
for (tag in tags) {
if (gamepad != null) {
if (binds.exists(tag)) {
for (i in binds[tag].gamepad)
if (i != FlxGamepadInputID.NONE && gamepad.checkStatus(binds[tag].gamepad[i], state))
for (i in 0...binds[tag].gamepad.length)
if (gamepad.checkStatus(binds[tag].gamepad[i], state))
return true;
} else {
if (gamepad.checkStatus(FlxGamepadInputID.fromString(tag), state))
return true;
}
} else {
if (binds.exists(tag)) {
for (i in binds[tag].key)
if (i != FlxKey.NONE && FlxG.keys.checkStatus(binds[tag].key[i], state))
for (i in 0...binds[tag].key.length)
if (FlxG.keys.checkStatus(binds[tag].key[i], state))
return true;
} else {
if (FlxG.keys.checkStatus(FlxKey.fromString(tag), state))
Expand Down

0 comments on commit 26be58d

Please sign in to comment.