summaryrefslogtreecommitdiff
path: root/textscreen/txt_button.c
diff options
context:
space:
mode:
authorSimon Howard2006-09-18 22:19:00 +0000
committerSimon Howard2006-09-18 22:19:00 +0000
commitef8bdb1feae078684843ae8ed3af0c632cc5eda0 (patch)
treee8659e27788f54b941991c7896b989617c1cc15b /textscreen/txt_button.c
parent47ae7506fc1e286cbce74f1126fa016f31d71996 (diff)
downloadchocolate-doom-ef8bdb1feae078684843ae8ed3af0c632cc5eda0.tar.gz
chocolate-doom-ef8bdb1feae078684843ae8ed3af0c632cc5eda0.tar.bz2
chocolate-doom-ef8bdb1feae078684843ae8ed3af0c632cc5eda0.zip
Add function to set button label.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 614
Diffstat (limited to 'textscreen/txt_button.c')
-rw-r--r--textscreen/txt_button.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c
index b07d8096..fa808095 100644
--- a/textscreen/txt_button.c
+++ b/textscreen/txt_button.c
@@ -102,6 +102,12 @@ txt_widget_class_t txt_button_class =
TXT_ButtonMousePress,
};
+void TXT_SetButtonLabel(txt_button_t *button, char *label)
+{
+ free(button->label);
+ button->label = strdup(label);
+}
+
txt_button_t *TXT_NewButton(char *label)
{
txt_button_t *button;