commit 20a1417b2e619ee1801737463a7e800096dcd3f8
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Sat Dec 16 01:53:54 2006 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Sat Dec 16 01:53:54 2006 +0000
Add function to set radio button labels.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 779
---
textscreen/txt_radiobutton.c | 6 ++++++
textscreen/txt_radiobutton.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/textscreen/txt_radiobutton.c b/textscreen/txt_radiobutton.c
index a653fa0c..7ede7211 100644
--- a/textscreen/txt_radiobutton.c
+++ b/textscreen/txt_radiobutton.c
@@ -143,3 +143,9 @@ txt_radiobutton_t *TXT_NewRadioButton(char *label, int *variable, int value)
return radiobutton;
}
+void TXT_SetRadioButtonLabel(txt_radiobutton_t *radiobutton, char *value)
+{
+ free(radiobutton->label);
+ radiobutton->label = strdup(value);
+}
+
diff --git a/textscreen/txt_radiobutton.h b/textscreen/txt_radiobutton.h
index 5174d958..d668254c 100644
--- a/textscreen/txt_radiobutton.h
+++ b/textscreen/txt_radiobutton.h
@@ -35,6 +35,7 @@ struct txt_radiobutton_s
};
txt_radiobutton_t *TXT_NewRadioButton(char *label, int *variable, int value);
+void TXT_SetRadioButtonLabel(txt_radiobutton_t *radiobutton, char *value);
#endif /* #ifndef TXT_RADIOBUTTON_H */