Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Extending Gosu / InputHandler (ruby style)
- - By RavensKrag Date 2010-11-21 17:54 Edited 2010-12-14 01:49
The original gist has been removed.  If you still want tho code, do not worry, as I have simply moved it into my regular github repository.  The link will follow.

Chad Godsey uploaded a class called InputHandler a while back, but the Ruby version was a bit unruly for my tastes.  Thus, I have rewritten it, using more object-oriented programming instead of the nested hashes found in the original code.  I think my version is much easier to understand and extend, but that could just be me. 

I'm currently working on an additional input type called Combo, which will detect button presses that are a certain amount of time apart.  This spacing can even be different between button presses.  I'll try to remember to post that up as well once that's done.

Thanks again to Chad Godsey for the original code.

Parent - - By RavensKrag Date 2010-12-14 01:50
Bump: Code has been updated with new Combo input type.
Parent - - By banister Date 2010-12-14 01:52
can i use this to implement cheat-codes, a la "idkfa" (for doom)
Parent - By RavensKrag Date 2010-12-14 01:57
I don't see why not ^_^ If the implementation in unclear, let me know and I'll put some documentation in there, or whip up a quick example.
Up Topic Gosu / Extending Gosu / InputHandler (ruby style)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill