Allow using SPACE instead of ENTER in menus
This commit is contained in:
parent
a9fe039928
commit
6b28f5c001
2 changed files with 4 additions and 2 deletions
|
@ -17,6 +17,8 @@ HIDDEN_MASK = '*'
|
|||
|
||||
NEWLINE = 10
|
||||
|
||||
SPACE = 32
|
||||
|
||||
DELETE = 330
|
||||
|
||||
BACKSPACE = 263
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import curses
|
||||
from time import sleep
|
||||
from fallout_functions import slowWrite, centeredWrite, NEWLINE, addSound
|
||||
from fallout_functions import slowWrite, centeredWrite, NEWLINE, SPACE, addSound
|
||||
|
||||
###################### Functions ############################
|
||||
|
||||
|
@ -15,7 +15,7 @@ def makeSelection(scr, SELECTIONS, MSGS):
|
|||
selection_start_y = scr.getyx()[0]
|
||||
width = scr.getmaxyx()[1]
|
||||
|
||||
while inchar != NEWLINE:
|
||||
while inchar not in [NEWLINE, SPACE]:
|
||||
# move to start of selections and hightlight current selection
|
||||
scr.move(selection_start_y, 0)
|
||||
line = 0
|
||||
|
|
Loading…
Reference in a new issue