shithub: choc

Download patch

ref: 64b2890756bc7f48fdf2fd0ef8c25dd8f0fd1c22
parent: e4dcdc8be43cd9b07e7f3a7b54279f54f531c419
author: Simon Howard <fraggle@gmail.com>
date: Mon May 29 17:02:38 EDT 2006

Convert calculator example to struts

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

--- a/textscreen/examples/calculator.c
+++ b/textscreen/examples/calculator.c
@@ -119,7 +119,7 @@
     TXT_SetBGColor(input_box, TXT_COLOR_BLACK);
     TXT_AddWidget(window, input_box);
     TXT_AddWidget(window, TXT_NewSeparator(NULL));
-    TXT_AddWidget(window, NULL);
+    TXT_AddWidget(window, TXT_NewStrut(0, 1));
 
     table = TXT_NewTable(4);
     TXT_AddWidget(window, table);
@@ -143,7 +143,7 @@
     TXT_AddWidget(table, equals_button);
     AddOperatorButton(table, "/", OP_DIV);
     
-    TXT_AddWidget(window, NULL);
+    TXT_AddWidget(window, TXT_NewStrut(0, 1));
     UpdateInputBox();
 }