#344 include holding down keys for number fields

This commit is contained in:
Mikayla Fischler 2023-09-23 16:50:54 -04:00
parent 689d474796
commit 8ab1307b2b

View File

@ -91,7 +91,7 @@ local function number_field(args)
if e.value == 0 then e.value = "" end
ifield.try_insert_char(event.name)
end
elseif event.type == KEY_CLICK.DOWN then
elseif event.type == KEY_CLICK.DOWN or event.type == KEY_CLICK.HELD then
if (event.key == keys.backspace or event.key == keys.delete) and (string.len(e.value) > 0) then
ifield.backspace()
has_decimal = string.find(e.value, "%.") ~= nil