Odamex
Setting the Standard in Multiplayer Doom
textscreen/txt_radiobutton.h File Reference

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_tTXT_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.

Detailed Description

Radio button widget.


Typedef Documentation

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.


Function Documentation

txt_radiobutton_t* TXT_NewRadioButton ( char *  label,
int *  variable,
int  value 
)

Create a new radio button widget.

Parameters:
labelThe label to display next to the radio button.
variablePointer to the variable tracking whether this radio button is selected.
valueIf the variable is equal to this value, the radio button appears selected.
Returns:
Pointer to the new radio button widget.
void TXT_SetRadioButtonLabel ( txt_radiobutton_t radiobutton,
char *  value 
)

Set the label on a radio button.

Parameters:
radiobuttonThe radio button.
valueThe new label.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends