changed a stupid behaviour that allowed a backspace to be entered as the first char of a name
This commit is contained in:
parent
b42813cf75
commit
60f0545878
@ -311,6 +311,8 @@ def enter_name():
|
||||
if event.type == KEYDOWN:
|
||||
if event.key == pygame.K_BACKSPACE:
|
||||
name = name[:-1]
|
||||
elif event.key == pygame.K_RETURN:
|
||||
# do nothing
|
||||
elif event.key == pygame.K_RETURN and len(name) > 0:
|
||||
clear_screen()
|
||||
return name
|
||||
|
Loading…
Reference in New Issue
Block a user