diff options
author | Simon Howard | 2011-03-22 21:33:17 +0000 |
---|---|---|
committer | Simon Howard | 2011-03-22 21:33:17 +0000 |
commit | e339efa45fb54e794d1dd26f7a716a383cc3dc6d (patch) | |
tree | e56b2314c6682211e7c7dcf701f9c100605beb8c /textscreen/txt_separator.c | |
parent | bc087b49e2e5a9c00b5b1620b4bd289ebee5ee73 (diff) | |
download | chocolate-doom-e339efa45fb54e794d1dd26f7a716a383cc3dc6d.tar.gz chocolate-doom-e339efa45fb54e794d1dd26f7a716a383cc3dc6d.tar.bz2 chocolate-doom-e339efa45fb54e794d1dd26f7a716a383cc3dc6d.zip |
Switch separator to show "screen mode" or "window size" depending on
whether fullscreen is turned on or not.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2308
Diffstat (limited to 'textscreen/txt_separator.c')
-rw-r--r-- | textscreen/txt_separator.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/textscreen/txt_separator.c b/textscreen/txt_separator.c index 6b779626..563d0c62 100644 --- a/textscreen/txt_separator.c +++ b/textscreen/txt_separator.c @@ -80,6 +80,20 @@ static void TXT_SeparatorDestructor(TXT_UNCAST_ARG(separator)) free(separator->label); } +void TXT_SetSeparatorLabel(txt_separator_t *separator, char *label) +{ + free(separator->label); + + if (label != NULL) + { + separator->label = strdup(label); + } + else + { + separator->label = NULL; + } +} + txt_widget_class_t txt_separator_class = { TXT_NeverSelectable, @@ -99,14 +113,8 @@ txt_separator_t *TXT_NewSeparator(char *label) TXT_InitWidget(separator, &txt_separator_class); - if (label != NULL) - { - separator->label = strdup(label); - } - else - { - separator->label = NULL; - } + separator->label = NULL; + TXT_SetSeparatorLabel(separator, label); return separator; } |