sliders in forms + form component setValue (hopefully didnt break anything)

This commit is contained in:
kepler155c@gmail.com
2019-07-12 12:47:51 -06:00
parent 51e40a1dd7
commit c43fe19f1d
3 changed files with 39 additions and 9 deletions

View File

@@ -29,10 +29,11 @@ function UI.Form:setValues(values)
self.values = values
for _,child in pairs(self.children) do
if child.formKey then
-- this should be child:setValue(self.values[child.formKey])
-- so chooser can set default choice if null
-- null should be valid as well
child.value = self.values[child.formKey] or ''
if child.setValue then
child:setValue(self.values[child.formKey])
else
child.value = self.values[child.formKey] or ''
end
end
end
end