Commit fdea18bd authored by Max Kobelt's avatar Max Kobelt
Browse files

Fix not deleting characters from input

parent dcdd7919
......@@ -29,12 +29,14 @@ void calcMenu() {
// 0-9, A-Z and a-z
if (((key >= KEY_ZERO && key <= KEY_NINE) || (key >= KEY_A && key <= KEY_Z) || (key >= 97 && key <= 122)) && letterCount < MAX_INPUT_CHARS) {
name[letterCount++] = key;
} else if (IsKeyPressed(KEY_BACKSPACE) && letterCount > 0) {
name[--letterCount] = '\0';
}
key = GetKeyPressed();
}
if (IsKeyPressed(KEY_BACKSPACE) && letterCount > 0) {
name[--letterCount] = 0;
}
}
void drawMenu() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment