Created
January 5, 2015 22:11
-
-
Save chozabu/0c01baeb85f3680ffdc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
win = Window | |
win.bind(on_keyboard=self.my_key_handler) | |
win.bind(on_joy_axis=self.my_axis_handler) | |
win.bind(on_joy_hat=self.printe) | |
win.bind(on_joy_ball=self.printe) | |
win.bind(on_joy_button_down=self.my_jbutton_down) | |
win.bind(on_joy_button_up=self.printe) | |
def printe(self, window, stickid, a=0,b=0,c=0,d=0,e=0): | |
print a,b,c,d,e | |
return False | |
def my_jbutton_down(self, window, stickid, buttonid): | |
if self.current_menu_ref == self.menu: | |
self.menu.playGame(None) | |
self.current_menu_ref.on_back() | |
return False | |
def my_axis_handler(self, window, stickid, axisid, value): | |
riders.sendinput(stickid,axisid,value) | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment