added less than 3 letter names
This commit is contained in:
parent
af13bc47be
commit
85881f3851
@ -133,9 +133,12 @@ def enterName():
|
|||||||
if len(name) < MAX_NAME_LENGTH:
|
if len(name) < MAX_NAME_LENGTH:
|
||||||
if event.type == KEYDOWN:
|
if event.type == KEYDOWN:
|
||||||
if event.key == pygame.K_BACKSPACE:
|
if event.key == pygame.K_BACKSPACE:
|
||||||
name = name[:-1]
|
name = name[:-1]
|
||||||
|
elif event.key == pygame.K_RETURN:
|
||||||
|
clearScreen()
|
||||||
|
return name
|
||||||
else:
|
else:
|
||||||
name += event.unicode
|
name += event.unicode
|
||||||
elif event.key == pygame.K_BACKSPACE:
|
elif event.key == pygame.K_BACKSPACE:
|
||||||
name = name[:-1]
|
name = name[:-1]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user