Files
Basalt/docs/docs1_6/objects/Radio.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

1.2 KiB

Radios are objects which you can freely place. The user is then able to select a item from the radio-list.

Object methods also apply for radios.

addItem Adds a new item into the list
removeItem Removes a item from the list
editItem Changes a already existing item in the list
getItem Returns a item by its index
getItemCount Returns the item count
getAll Returns the entire list as a table
selectItem Selects a item
clear Makes the entire list empty
getItemIndex Returns the currently active item index
setSelectedItem Changes the default bg and fg, when the user selects a item

A item-table in lists looks like the following example:

item = {
  text="1. Entry",  -- the text its showing
  bgCol=colors.black,  -- the background color
  fgCol=colors.white -- the foreground color
  args = {} -- custom args you want to pass, which you will be able to access in for example onChange events
}