Hi, post to ask if there is a way to use the method button_down(id) out of a class that inherits from Window. Example: I can invoke the method button_down?(id) outside as follows: window.button_down?, returning true if I press a button, but as I do with the method button_down(id)??
I tried to do the following:
if id == KbUp then
But got no results.
I hope their solutions, bye!
button_down(id) method inside class you wan to use it and then call it from
class GameWindow < Window
This syntax seems to be for a singleton method defined on the window variable, which might not be what you intend to do. Still, I don't think that should cause any problems.
Can you clarify whether you are attempting to define #button_down() or #button_down?() ?
The former is what you want to be redefining in descendants of Gosu::Window. The latter is used to see if the given key is currently depressed or not.
Powered by mwForum 2.29.0 © 1999-2013 Markus Wichitill