#344 work in progress on text field & paste events, re-show number field on val/min/max changes

This commit is contained in:
Mikayla Fischler
2023-09-19 23:51:58 -04:00
parent 7a87499aa4
commit a2182d9566
4 changed files with 207 additions and 4 deletions

View File

@@ -98,15 +98,24 @@ local function number_field(args)
-- set the value
---@param val number number to show
function e.set_value(val) e.value = val end
function e.set_value(val)
e.value = val
show()
end
-- set minimum input value
---@param min integer minimum allowed value
function e.set_min(min) args.min = min end
function e.set_min(min)
args.min = min
show()
end
-- set maximum input value
---@param max integer maximum allowed value
function e.set_max(max) args.max = max end
function e.set_max(max)
args.max = max
show()
end
-- handle focused
e.on_focused = show