Skip to content

Commit

Permalink
Merge pull request #43 from metaMMA/master
Browse files Browse the repository at this point in the history
Fix bug when using keyboard to switch screens. (Fixes #42)
  • Loading branch information
genebean authored Mar 1, 2020
2 parents dba8e80 + 57b0610 commit f9a509a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,8 @@ def daylight(weather):
# On 'd' key, set mode to 'weather'.
elif event.key == pygame.K_d:
MODE = 'd'
D_COUNT = 1
H_COUNT = 0
NON_WEATHER_TIMEOUT = 0
PERIODIC_INFO_ACTIVATION = 0

Expand All @@ -857,12 +859,16 @@ def daylight(weather):
# On 'i' key, set mode to 'info'.
elif event.key == pygame.K_i:
MODE = 'i'
D_COUNT = 0
H_COUNT = 0
NON_WEATHER_TIMEOUT = 0
PERIODIC_INFO_ACTIVATION = 0

# on 'h' key, set mode to 'hourly'
elif event.key == pygame.K_h:
MODE = 'h'
D_COUNT = 0
H_COUNT = 1
NON_WEATHER_TIMEOUT = 0
PERIODIC_INFO_ACTIVATION = 0

Expand Down

0 comments on commit f9a509a

Please sign in to comment.