Skip to content
This repository was archived by the owner on Mar 10, 2021. It is now read-only.

Documentation: when to call input:update() #21

@shousper

Description

@shousper

I just spent a bit of time figuring out that the reason :down(..) would work but :pressed(..), etc. wouldn't was because I was calling input:update() before checking the state of the inputs.

It might be worth highlighting this in the README.md with an example :)

For example:

function love.update(dt)
    if input:pressed('down') then print('down was pressed!') end
    -- your other input checks here..
    input:update()
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions