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

Fix "ghosting" problem with buttons #4

Open
Jigoku opened this issue Oct 9, 2017 · 0 comments
Open

Fix "ghosting" problem with buttons #4

Jigoku opened this issue Oct 9, 2017 · 0 comments

Comments

@Jigoku
Copy link
Owner

Jigoku commented Oct 9, 2017

Some button combinations cancel out others. Instead of "returning true",

function paddy.isDown(key)
	-- Check for any buttons which are currently being pressed
	for _,widget in ipairs(paddy.widgets) do
		for _,button in ipairs(widget.buttons) do
			if button.isDown and button.name == key then return true end
		end
	end
end

Change this to change the button state, eg;

paddy.dpad.buttons = {
	{ name="up",   x=paddy.buttonw, y=0, pressed=true },
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant