Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Jan 29, 2025
1 parent ccc1a1d commit 317e430
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Input/FlxAction/source/Player.hx
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,17 @@ class Player extends FlxSprite
right.addKey(D, PRESSED);

// Add virtual pad (on-screen button) inputs
#if (flixel >= version("6.0.0"))
up.addInput(_virtualPad.getButton(UP), PRESSED);
down.addInput(_virtualPad.getButton(DOWN), PRESSED);
left.addInput(_virtualPad.getButton(LEFT), PRESSED);
right.addInput(_virtualPad.getButton(RIGHT), PRESSED);
#else
up.addInput(_virtualPad.buttonUp, PRESSED);
down.addInput(_virtualPad.buttonDown, PRESSED);
left.addInput(_virtualPad.buttonLeft, PRESSED);
right.addInput(_virtualPad.buttonRight, PRESSED);
#end

// Add gamepad DPAD inputs
up.addGamepad(DPAD_UP, PRESSED);
Expand Down

0 comments on commit 317e430

Please sign in to comment.