Fix supression ... #61
|
@ -30,9 +30,11 @@ def __update(world: World):
|
|||
writing = entity[Writing]
|
||||
text = entity[Text]
|
||||
for key in pressed:
|
||||
if key == "backspace":
|
||||
if key == "backspace" and text.text != writing.base_text:
|
||||
text.text = text.text[:-1]
|
||||
world.new_entity().set(CLICK_SOUND)
|
||||
if text.text == "":
|
||||
text.text = writing.base_text
|
||||
if key.startswith("["): # pavé numerique
|
||||
key = key[1]
|
||||
if key in writing.accepted_chars and (
|
||||
|
|
Loading…
Reference in a new issue