Class RadioButton
A radio button
Extends CheckBox, so the fields RadioButton uses for drawing are the same as those of CheckBox.
Usage:
-- Create a group of buttons that print when they are selected.
local group = Panel(0, 0)
local numButtons = 10
for i = 1, numButtons, 1 do
local button = RadioButton(i * 20, 0, 16)
button:addListener("selected", function(t, k, old, new)
if new then
print("Button " .. i .. " was selected")
end
end)
group:add(button)
end
Constructor
| RadioButton:_init (x, y, size) | Constructs a new RadioButton. |