Creates a radio button in a group; checking one radio button unchecks the others of the
same group. checkSizeRatio is how much of the circle the inner dot fills.
The name, the group, the checked state, the dot size, the colors and the optional size
The radio button
const optionA = bitbybit.babylon.gui.radioButton.createRadioButton({ name: "optionA", group: "material", isChecked: true, checkSizeRatio: 0.8, color: "#f0cebb", background: "black", width: "30px", height: "30px" });
panel.addControl(optionA);
optionA.onIsCheckedChangedObservable.add((checked) => { console.log(checked); });
Passes through the name of a radio button event, its checked state changing, as a typed selector for code that subscribes to radio button events by name.
The event selector
The same selector
Reads how much of a radio button's circle its inner dot fills.
The radio button
The ratio
Reads the group a radio button belongs to.
The radio button
The group name
Reads the background color of a radio button's circle.
The radio button
The background color
Sets how much of a radio button's circle its inner dot fills, from 0 to 1.
The radio button and the ratio
The same radio button
Moves a radio button to a group; only one radio button of a group can be checked at a time.
The radio button and the group name
The same radio button
Sets the background color of a radio button's circle, as a CSS color.
The radio button and the background color
The same radio button
Radio buttons: round toggles of which only one per
groupcan be checked at a time, for picking one option from a few. Subscribe to the checked changed event to react to the user.