Skip to content

Commit

Permalink
small input bugfix
Browse files Browse the repository at this point in the history
y
  • Loading branch information
Joalor64GH authored Oct 18, 2024
1 parent 9b87580 commit 8425d72
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 3 deletions.
3 changes: 2 additions & 1 deletion assets/achievements/achList.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
example
example
full_combo
5 changes: 5 additions & 0 deletions assets/achievements/full_combo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "FC",
"desc": "Great job!",
"hint": "Complete a song without missing."
}
Binary file added assets/images/achievements/full_combo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/backend/Input.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ typedef Bind = {

class Input {
public static var binds:Map<String, Bind> = [
'left' => {key: [LEFT, D], gamepad: [DPAD_LEFT, LEFT_TRIGGER]},
'left' => {key: [LEFT, A], gamepad: [DPAD_LEFT, LEFT_TRIGGER]},
'down' => {key: [DOWN, S], gamepad: [DPAD_DOWN, LEFT_SHOULDER]},
'up' => {key: [UP, W], gamepad: [DPAD_UP, RIGHT_SHOULDER]},
'right' => {key: [RIGHT, D], gamepad: [DPAD_RIGHT, RIGHT_TRIGGER]},
Expand Down
6 changes: 5 additions & 1 deletion source/states/AchievementsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ class AchievementsState extends ExtendableState {
camFollow.screenCenter(X);
add(camFollow);

var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.GRAY);
var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menu/backgrounds/achievements_bg'));
bg.scrollFactor.set();
bg.screenCenter();
add(bg);

var grid:FlxBackdrop = new FlxBackdrop(FlxGridOverlay.createGrid(80, 80, 160, 160, true, 0x33FFFFFF, 0x0));
grid.velocity.set(40, 40);
add(grid);

achievementGrp = new FlxTypedGroup<FlxText>();
add(achievementGrp);

Expand Down
3 changes: 3 additions & 0 deletions source/states/MenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ class MenuState extends ExtendableState {
if (Input.justPressed('u'))
ExtendableState.switchState(new UITestState());
#end

if (Input.justPressed('a')) // placeholder for now
ExtendableState.switchState(new AchievementsState());
}
}

Expand Down

0 comments on commit 8425d72

Please sign in to comment.