Skip to content

Commit

Permalink
remapped keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
cflavio committed Jul 19, 2017
1 parent 4540fec commit 2a206ed
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
14 changes: 8 additions & 6 deletions menu/inputpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def on_back(self):
'left': self.mdt.gui.buttons[2]['text'],
'right': self.mdt.gui.buttons[3]['text'],
'button': self.mdt.gui.buttons[4]['text'],
'respawn': self.mdt.gui.buttons[5]['text']}
'respawn': self.mdt.gui.buttons[5]['text'],
'pause': self.mdt.gui.buttons[6]['text']}
dct['joystick'] = self.mdt.gui._joypad_cb['indicatorValue']
self.mdt.menu.gui.notify('on_input_back', dct)

Expand Down Expand Up @@ -64,11 +65,12 @@ def add_btn(text, pos_z):
self.buttons += [btn]
buttons_data = [
(_('Accelerate'), 'forward', .6),
(_('Brake/Reverse'), 'rear', .4),
(_('Left'), 'left', .2),
(_('Right'), 'right', 0),
(_('Weapon'), 'button', -.2),
(_('Respawn'), 'respawn', -.4)]
(_('Brake/Reverse'), 'rear', .42),
(_('Left'), 'left', .24),
(_('Right'), 'right', .06),
(_('Weapon'), 'button', -.12),
(_('Respawn'), 'respawn', -.28),
(_('Pause'), 'pause', -.46)]
for btn_data in buttons_data:
add_lab(btn_data[0], btn_data[2])
add_btn(self.keys[btn_data[1]], btn_data[2])
Expand Down
1 change: 0 additions & 1 deletion project.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# TODO LIST =====

# 0.7
# implement raw keyboard codes
# apply other keyboard-driven forces while the car is drifting to workaround
# the lack of drifting support
# refactoring of racing.race
Expand Down
5 changes: 3 additions & 2 deletions yorg/yorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ def __init__(self):
'rear': 'arrow_down',
'left': 'arrow_left',
'right': 'arrow_right',
'button': 'x',
'respawn': 'r'},
'button': 'space',
'respawn': 'r',
'pause': 'p'},
'joystick': 0,
'player_name': '',
'shaders': 1},
Expand Down
2 changes: 1 addition & 1 deletion yyagl

0 comments on commit 2a206ed

Please sign in to comment.