Fix backspace not deleting in textfields, but shows ⌂. Closes https://github.com/iceiix/steven/issues/55

This commit is contained in:
ice_iix 2018-12-04 15:51:20 -08:00
parent de4fd7d28d
commit 3a359267dd
1 changed files with 1 additions and 1 deletions

View File

@ -1312,7 +1312,7 @@ impl TextBoxBuilder {
impl UIElement for TextBox {
fn key_press(&mut self, game: &mut crate::Game, key: VirtualKeyCode, down: bool, ctrl_pressed: bool) {
match (key, down) {
(VirtualKeyCode::Back, false) => {self.input.pop();},
(VirtualKeyCode::Back, _) => {self.input.pop();},
(VirtualKeyCode::Return, false) => {
use std::mem;
let len = self.submit_funcs.len();