|
Odamex
Setting the Standard in Multiplayer Doom
|
Radio button widget. More...
Go to the source code of this file.
Data Structures | |
| struct | txt_radiobutton_s |
Typedefs | |
| typedef struct txt_radiobutton_s | txt_radiobutton_t |
| A radio button widget. | |
Functions | |
| txt_radiobutton_t * | TXT_NewRadioButton (char *label, int *variable, int value) |
| Create a new radio button widget. | |
| void | TXT_SetRadioButtonLabel (txt_radiobutton_t *radiobutton, char *value) |
| Set the label on a radio button. | |
Radio button widget.
| typedef struct txt_radiobutton_s txt_radiobutton_t |
A radio button widget.
Radio buttons are typically used in groups, to allow a value to be selected from a range of options. Each radio button corresponds to a particular option that may be selected. A radio button has an indicator to indicate whether it is the currently-selected value, and a text label.
Internally, a radio button tracks an integer variable that may take a range of different values. Each radio button has a particular value associated with it; if the variable is equal to that value, the radio button appears selected. If a radio button is pressed by the user through the GUI, the variable is set to its value.
When a radio button is selected, the "selected" signal is emitted.
| txt_radiobutton_t* TXT_NewRadioButton | ( | char * | label, |
| int * | variable, | ||
| int | value | ||
| ) |
Create a new radio button widget.
| label | The label to display next to the radio button. |
| variable | Pointer to the variable tracking whether this radio button is selected. |
| value | If the variable is equal to this value, the radio button appears selected. |
| void TXT_SetRadioButtonLabel | ( | txt_radiobutton_t * | radiobutton, |
| char * | value | ||
| ) |
Set the label on a radio button.
| radiobutton | The radio button. |
| value | The new label. |