Fix supression ... #61

Merged
CoCo_Sol merged 1 commit from typing into main 2023-11-04 18:36:32 +00:00
Showing only changes of commit 28b78774d2 - Show all commits

View file

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