Allow using SPACE instead of ENTER in menus

This commit is contained in:
Firepup Sixfifty 2024-04-27 20:26:44 -05:00
parent a9fe039928
commit 6b28f5c001
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA
2 changed files with 4 additions and 2 deletions

View file

@ -17,6 +17,8 @@ HIDDEN_MASK = '*'
NEWLINE = 10
SPACE = 32
DELETE = 330
BACKSPACE = 263

View file

@ -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