Skip to content

Fix button functions behavior that differs from Playdate's #88

@AntonPetrov83

Description

@AntonPetrov83
  1. Playdate functions playdate.buttonIsPressed(), buttonJustPressed, buttonJustReleased are case-insensitive.
    For example this snippet from the "2020":
		if playdate.buttonIsPressed("UP") then
			dy = -4
		elseif playdate.buttonIsPressed("DOWN") then
			dy = 4
		end
		if playdate.buttonIsPressed("LEFT") then
			dx = -4
		elseif playdate.buttonIsPressed("RIGHT") then
			dx = 4
		end
  1. Constants kButtonUp, kButtonDown etc. must be integers and not strings.
  2. Function playdate.getButtonState() must return the state of all buttons as three bit flag values (current, pressed, released).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions