namespace lc::ui::api
The Text GUI widget allows the user to enter data in a text format.
Constructs an Text GUI widget.
local text1 = gui.Text("Text1")
Used to get and set the desired value for the text widget. Data of type string is returned.
local textval = text1:value()
text1:setValue("SomeText")
Add a finish callback which is called when the user presses enter after entering the text or clicks somewhere else and the input gui loses focus. This is different from the dialog widget finish callback.
text1:addFinishCallback(function() message("Finished entering text") end)
Add an on change callback which is called when the user types anything i.e. on any change to the text input.
text1:addOnChangeCallback(function(newtext) message(tostring(newtext)) end)
namespace lc::ui::api
The Color Picker GUI widget allows the user to enter color data by choosing it visually.
Constructs a Color GUI widget.
local color1 = gui.Color("Color1")
Used to get and set the desired value for the color widget. Data of type lc::Color is returned. setValue expects a lc::Color as parameter.
local col = color1:value()
color1:setValue(lc.Color(1,1,1))
Adds a callback which is called whenever a color is selected in the color gui widget.
color1:addCallback(function(col) message("Color picked") end)
namespace lc::ui::api
The Horizontal Group GUI widget allows the user to store the input gui widgets in a horizontal layout.
Constructs a Horizontal Group GUi widget. The input gui widgets in the group are added to the final value table but not the horizontal group.
local horiz1 = gui.HorizontalGroup("Horizontal1")
Add an Input GUI widget to the horizontal group. Expects a key and gui widget as parameters.
local angle1 = gui.Angle("Angle1") horiz1:addWidget("angle1", angle1)
namespace lc::ui::api
The RadioButton Group GUI widget allows the user to store the radio buttons in a group so that only one radio button can be selected in the group.
Constructs a RadioButton Group GUI class.
local radiogroup1 = gui.RadioGroup("RadioGroup1")
Add an RadioButton GUI widget to the radio group. Expects a key and radiobutton as parameters.
local radio1 = gui.RadioButton("Radio1") radiogroup1:addButton("radio1", radio1)