diff options
author | Simon Howard | 2006-05-29 21:39:12 +0000 |
---|---|---|
committer | Simon Howard | 2006-05-29 21:39:12 +0000 |
commit | b3e5170bbba1c3048da86a5291cd45524abfeac2 (patch) | |
tree | cc272ff689b826eac099e3cb7d53070c7da50c44 /textscreen/examples | |
parent | 64b2890756bc7f48fdf2fd0ef8c25dd8f0fd1c22 (diff) | |
download | chocolate-doom-b3e5170bbba1c3048da86a5291cd45524abfeac2.tar.gz chocolate-doom-b3e5170bbba1c3048da86a5291cd45524abfeac2.tar.bz2 chocolate-doom-b3e5170bbba1c3048da86a5291cd45524abfeac2.zip |
Add ability to make widgets right aligned or centered within tables.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 546
Diffstat (limited to 'textscreen/examples')
-rw-r--r-- | textscreen/examples/guitest.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/textscreen/examples/guitest.c b/textscreen/examples/guitest.c index b278d80f..73a3aa25 100644 --- a/textscreen/examples/guitest.c +++ b/textscreen/examples/guitest.c @@ -68,6 +68,7 @@ void SetupWindow(void) txt_button_t *button; txt_checkbox_t *cheesy_checkbox; txt_window_action_t *pwn; + txt_label_t *toplabel; char buf[100]; int i; @@ -76,9 +77,11 @@ void SetupWindow(void) TXT_AddWidget(window, TXT_NewSeparator("Main section")); table = TXT_NewTable(3); - TXT_AddWidget(window, TXT_NewLabel(" This is a multiline label.\n" - " A single label object contains \n" - " all three of these lines.\n")); + toplabel = TXT_NewLabel(" This is a multiline label.\n" + " A single label object contains \n" + " all three of these lines.\n"); + TXT_AddWidget(window, toplabel); + TXT_SetWidgetAlign(toplabel, TXT_HORIZ_CENTER); TXT_AddWidget(window, table); @@ -98,6 +101,7 @@ void SetupWindow(void) table = TXT_NewTable(2); TXT_AddWidget(window, table); + TXT_SetWidgetAlign(table, TXT_HORIZ_CENTER); cheesy_checkbox = TXT_NewCheckBox("Cheesy", &cheesy); TXT_AddWidget(table, cheesy_checkbox); |