summaryrefslogtreecommitdiff
path: root/textscreen/examples
diff options
context:
space:
mode:
authorSimon Howard2006-05-25 21:27:34 +0000
committerSimon Howard2006-05-25 21:27:34 +0000
commit42ebb5bebb6889de52c04a5eb65837b20b489445 (patch)
treec2a399979208c455e768e855246e42d20d12f18e /textscreen/examples
parent76e770217095fa7b42e62ddbd4e09e369d43bec1 (diff)
downloadchocolate-doom-42ebb5bebb6889de52c04a5eb65837b20b489445.tar.gz
chocolate-doom-42ebb5bebb6889de52c04a5eb65837b20b489445.tar.bz2
chocolate-doom-42ebb5bebb6889de52c04a5eb65837b20b489445.zip
Allow NULL to be added to tables to specify a spacer (empty cell).
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 530
Diffstat (limited to 'textscreen/examples')
-rw-r--r--textscreen/examples/calculator.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/textscreen/examples/calculator.c b/textscreen/examples/calculator.c
index 7c23252d..2cc1392a 100644
--- a/textscreen/examples/calculator.c
+++ b/textscreen/examples/calculator.c
@@ -24,7 +24,7 @@ void UpdateInputBox(void)
{
char buf[20];
- sprintf(buf, " %i", input_value);
+ sprintf(buf, " %i", input_value);
TXT_SetLabel(input_box, buf);
}
@@ -116,12 +116,11 @@ void BuildGUI()
window = TXT_NewWindow("Calculator");
- TXT_AddWidget(window, TXT_NewSeparator(NULL));
input_box = TXT_NewLabel("asdf");
TXT_SetBGColor(input_box, TXT_COLOR_BLACK);
TXT_AddWidget(window, input_box);
TXT_AddWidget(window, TXT_NewSeparator(NULL));
- TXT_AddWidget(window, TXT_NewLabel(""));
+ TXT_AddWidget(window, NULL);
table = TXT_NewTable(4);
TXT_AddWidget(window, table);
@@ -139,13 +138,13 @@ void BuildGUI()
AddNumberButton(table, 3);
AddOperatorButton(table, "+", OP_PLUS);
AddNumberButton(table, 0);
- TXT_AddWidget(table, TXT_NewLabel(""));
+ TXT_AddWidget(table, NULL);
equals_button = TXT_NewButton(" = ");
TXT_SignalConnect(equals_button, "pressed", Calculate, NULL);
TXT_AddWidget(table, equals_button);
AddOperatorButton(table, "/", OP_DIV);
- TXT_AddWidget(window, TXT_NewLabel(""));
+ TXT_AddWidget(window, NULL);
UpdateInputBox();
}