Add auto selector widget
This update adds a selector widget and corresponding Kotlin API. Example:
Robot.kt
import org.team5499.dashboard.StringChooser
class Robot : TimedRobot(0.005) {
val chooser: StringChooser
var inlineId: Int
var concurrentId: Int
init {
chooser = StringChooser("SOME_VARIABLE", "default option", "first option",
"second option",
"default option",
"another option")
inlineId = chooser.addInlineListener() {
key: String, value: Any? ->
println("$key: $value")
}
concurrentId = chooser.addVarListener() {
key: String, value: Any? ->
println("$key: $value")
}
}
fun robotPeriodic() {
Dashboard.update()
chooser.runIfUpdate() {
key: String, value: Any? ->
println("$key: $value")
}
}
}