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

Button widget. More...

Go to the source code of this file.

Data Structures

struct  txt_button_s

Typedefs

typedef struct txt_button_s txt_button_t
 Button widget.

Functions

txt_button_tTXT_NewButton (char *label)
 Create a new button widget.
txt_button_tTXT_NewButton2 (char *label, TxtWidgetSignalFunc func, void *user_data)
 Create a new button widget, binding the "pressed" signal to a specified callback function.
void TXT_SetButtonLabel (txt_button_t *button, char *label)
 Change the label used on a button.

Detailed Description

Button widget.


Typedef Documentation

typedef struct txt_button_s txt_button_t

Button widget.

A button is a widget that can be selected to perform some action. When a button is pressed, it emits the "pressed" signal.


Function Documentation

txt_button_t* TXT_NewButton ( char *  label)

Create a new button widget.

Parameters:
labelThe label to use on the new button.
Returns:
Pointer to the new button widget.
txt_button_t* TXT_NewButton2 ( char *  label,
TxtWidgetSignalFunc  func,
void *  user_data 
)

Create a new button widget, binding the "pressed" signal to a specified callback function.

Parameters:
labelThe label to use on the new button.
funcThe callback function to invoke.
user_dataUser-specified pointer to pass to the callback.
Returns:
Pointer to the new button widget.
void TXT_SetButtonLabel ( txt_button_t button,
char *  label 
)

Change the label used on a button.

Parameters:
buttonThe button.
labelThe new label.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends