shithub: choc

Download patch

ref: ef8bdb1feae078684843ae8ed3af0c632cc5eda0
parent: 47ae7506fc1e286cbce74f1126fa016f31d71996
author: Simon Howard <[email protected]>
date: Mon Sep 18 18:19:00 EDT 2006

Add function to set button label.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 614

--- a/textscreen/txt_button.c
+++ b/textscreen/txt_button.c
@@ -102,6 +102,12 @@
     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;
--- a/textscreen/txt_button.h
+++ b/textscreen/txt_button.h
@@ -33,6 +33,7 @@
 };
 
 txt_button_t *TXT_NewButton(char *label);
+void TXT_SetButtonLabel(txt_button_t *button, char *label);
 
 #endif /* #ifndef TXT_BUTTON_H */