summaryrefslogtreecommitdiff
path: root/textscreen/txt_button.c
diff options
context:
space:
mode:
authorSimon Howard2006-05-20 20:49:50 +0000
committerSimon Howard2006-05-20 20:49:50 +0000
commit8741ed033996e3cfed28cfc97753ef0cd2c40b17 (patch)
tree868b9b22c1fc783a1eb8c5295b18fcb3b62d08b4 /textscreen/txt_button.c
parent6ecffa76f732fdc20873c1611723843464ac485a (diff)
downloadchocolate-doom-8741ed033996e3cfed28cfc97753ef0cd2c40b17.tar.gz
chocolate-doom-8741ed033996e3cfed28cfc97753ef0cd2c40b17.tar.bz2
chocolate-doom-8741ed033996e3cfed28cfc97753ef0cd2c40b17.zip
Add table class. Allow widgets with heights of more than one line.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 492
Diffstat (limited to 'textscreen/txt_button.c')
-rw-r--r--textscreen/txt_button.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c
index 35457d69..57b91c96 100644
--- a/textscreen/txt_button.c
+++ b/textscreen/txt_button.c
@@ -7,13 +7,14 @@
#include "txt_widget.h"
#include "txt_window.h"
-static int TXT_ButtonSizeCalc(txt_widget_t *widget)
+static void TXT_ButtonSizeCalc(txt_widget_t *widget, int *w, int *h)
{
txt_button_t *button = (txt_button_t *) widget;
// Minimum width is the string length + two spaces for padding
- return strlen(button->label) + 2;
+ *w = strlen(button->label) + 2;
+ *h = 1;
}
static void TXT_ButtonDrawer(txt_widget_t *widget, int w, int selected)