Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btnp() hold parameter time resets when any other button is pressed #108

Closed
Bentic opened this issue Apr 24, 2017 · 1 comment
Closed

btnp() hold parameter time resets when any other button is pressed #108

Bentic opened this issue Apr 24, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@Bentic
Copy link

Bentic commented Apr 24, 2017

It would seem that when holding a button with btnp() and hold and period parameters are set, pressing an other button resets the hold time.
So when holding the button and pressing an other button constantly before the hold time is met, the first button never returns true again.

Here is a quick example for testing purposes:

-- title:  game title
-- author: game developer
-- desc:   short description
-- script: lua
-- input:  gamepad

color=0

function TIC()

	if btnp(4,30,1)then color=(color+1)%16 end

	cls(3)
	print("Hold A for half a second,")
	print("colors will cycle every frame.",0,6)
	print("If you press any other button before half",0,12)
	print("a second while still holding A, it seems",0,18)
	print("the hold parameter of btnp() resets.",0,24)
	rect(99,47,42,42,15)
	rect(100,48,40,40,color)
end
@nesbox nesbox self-assigned this Apr 24, 2017
@nesbox nesbox added the bug label Apr 24, 2017
@nesbox nesbox added this to the 0.23.0 milestone May 2, 2017
@nesbox
Copy link
Owner

nesbox commented May 3, 2017

fixed on .23
closing...

@nesbox nesbox closed this as completed May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants