def button_down(id)
if id == Gosu::GP_BUTTON_1 and Gosu::GP_RIGHT
#do thing
end
end
def button_down(id)
case id
when (Gosu::BUTTON_1 and Gosu::GP_RIGHT)
#do thing
end
end
#thing
only when I press the second button. The buttons don't seem to work together. The one that fulfills the if/then statement or the case statement is the last thing. ie: Gosu::GP_RIGHT
Window#button_down
callback is called for each button press, and receives a single id. The id
will only ever equal one key/button. You have to check if the id
is one of the buttons in the combo, then check to see if the other button is also held down (with Gosu#button_down?(id)
).
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill