1
0
mirror of https://github.com/kepler155c/opus synced 2024-06-16 02:10:01 +00:00

ability to specify index in form fields

This commit is contained in:
kepler155c@gmail.com 2019-07-22 22:21:41 -06:00
parent ae98aaf9d5
commit c18945467f

View File

@ -60,14 +60,14 @@ function UI.Form:createForm()
end end
if child.formLabel then if child.formLabel then
child.x = self.labelWidth + self.margin - 1 child.x = self.labelWidth + self.margin - 1
child.y = y child.y = child.formIndex and (child.formIndex + self.margin - 1) or y
if not child.width and not child.ex then if not child.width and not child.ex then
child.ex = -self.margin child.ex = -self.margin
end end
table.insert(self.children, UI.Text { table.insert(self.children, UI.Text {
x = self.margin, x = self.margin,
y = y, y = child.y,
textColor = colors.black, textColor = colors.black,
width = #child.formLabel, width = #child.formLabel,
value = child.formLabel, value = child.formLabel,