diff options
author | Florian Jung <flo@windfisch.org> | 2015-08-24 18:06:30 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-08-24 18:06:30 +0200 |
commit | 58b0b9da0241ff8623581b2cb837eaf34b8f165d (patch) | |
tree | 84be13623a791cf142bcfa15207baa077d4c5c44 /gui.py | |
parent | ec5409a1f1467895af7ebed239bcabb7f3dd2a0c (diff) |
UI: change behaviour of S key, allow split+W always
Diffstat (limited to 'gui.py')
-rw-r--r-- | gui.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -273,10 +273,10 @@ def draw_frame(): pygame.display.quit() if event.type == KEYDOWN: if event.key == K_s: - if not input and bot_input: + if event.mod & KMOD_SHIFT and (input or bot_input): input = False bot_input = False - elif not input and not bot_input: + elif not input and bot_input: input = True bot_input = False else: @@ -291,11 +291,11 @@ def draw_frame(): marker[event.button-1] = win_to_world_pt(event.pos, c.player.center) marker_updated[event.button-1] = True print("set marker "+str(event.button-1)+" to "+str(event.pos)) + if event.type == KEYDOWN: + if event.key == K_w: + c.send_shoot() + if event.key == K_SPACE: + c.send_split() if input: - if event.type == KEYDOWN: - if event.key == K_w: - c.send_shoot() - if event.key == K_SPACE: - c.send_split() if event.type == MOUSEMOTION: c.send_target(*win_to_world_pt(event.pos, c.player.center)) |