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

Checkbox widget. More...

Go to the source code of this file.

Data Structures

struct  txt_checkbox_s

Typedefs

typedef struct txt_checkbox_s txt_checkbox_t
 Checkbox widget.

Functions

txt_checkbox_tTXT_NewCheckBox (char *label, int *variable)
 Create a new checkbox.
txt_checkbox_tTXT_NewInvertedCheckBox (char *label, int *variable)
 Create a new inverted checkbox.

Detailed Description

Checkbox widget.


Typedef Documentation

Checkbox widget.

A checkbox is used to control boolean values that may be either on or off. The widget has a label that is displayed to the right of the checkbox indicator. The widget tracks an integer variable; if the variable is non-zero, the checkbox is checked, while if it is zero, the checkbox is unchecked. It is also possible to create "inverted" checkboxes where this logic is reversed.

When a checkbox is changed, it emits the "changed" signal.


Function Documentation

txt_checkbox_t* TXT_NewCheckBox ( char *  label,
int *  variable 
)

Create a new checkbox.

Parameters:
labelThe label for the new checkbox.
variablePointer to the variable containing this checkbox's value.
Returns:
Pointer to the new checkbox.
txt_checkbox_t* TXT_NewInvertedCheckBox ( char *  label,
int *  variable 
)

Create a new inverted checkbox.

An inverted checkbox displays the opposite of a normal checkbox; where it would be checked, it appears unchecked, and vice-versa.

Parameters:
labelThe label for the new checkbox.
variablePointer to the variable containing this checkbox's value.
Returns:
Pointer to the new checkbox.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends