Skip to content

Commit

Permalink
Error fixed in tool+form Lua example
Browse files Browse the repository at this point in the history
  • Loading branch information
bsongis-frsky committed Apr 5, 2024
1 parent fd2c81a commit d238f07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/tool-form/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ local function create()
form.addColorField(line, nil, function() return data.color end, function(newValue) data.color = newValue end)

local line = form.addLine("Expansion panel example")
local panel
local field = form.addNumberField(line, nil, 1, 5, function() return data.count end, function(value)
data.count = value
panel:clear()
fillPanel(data, panel)
end)
field:default(1)
field:suffix(" lines")
local panel = form.addExpansionPanel("Lines")
panel = form.addExpansionPanel("Lines")
fillPanel(data, panel)

local line = form.addLine("Source example")
Expand Down

0 comments on commit d238f07

Please sign in to comment.