mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#344 include holding down keys for number fields
This commit is contained in:
parent
689d474796
commit
8ab1307b2b
@ -91,7 +91,7 @@ local function number_field(args)
|
|||||||
if e.value == 0 then e.value = "" end
|
if e.value == 0 then e.value = "" end
|
||||||
ifield.try_insert_char(event.name)
|
ifield.try_insert_char(event.name)
|
||||||
end
|
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
|
if (event.key == keys.backspace or event.key == keys.delete) and (string.len(e.value) > 0) then
|
||||||
ifield.backspace()
|
ifield.backspace()
|
||||||
has_decimal = string.find(e.value, "%.") ~= nil
|
has_decimal = string.find(e.value, "%.") ~= nil
|
||||||
|
Loading…
Reference in New Issue
Block a user