From 56824b130b786aab49876a71c6c768a17c5a4f1c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 10 Dec 2010 20:31:46 +0000 Subject: Replace txt_widget_t#selectable with a callback function to query whether the widget is selectable. This stops the table code from selecting things that aren't really selectable - eg. empty tables, scrollpanes containing unselectable widgets, etc. Fixes a bug with the warp menu (thanks Proteh). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2207 --- textscreen/txt_strut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'textscreen/txt_strut.c') diff --git a/textscreen/txt_strut.c b/textscreen/txt_strut.c index e7fe6328..f3a618f3 100644 --- a/textscreen/txt_strut.c +++ b/textscreen/txt_strut.c @@ -55,6 +55,7 @@ static int TXT_StrutKeyPress(TXT_UNCAST_ARG(strut), int key) txt_widget_class_t txt_strut_class = { + TXT_NeverSelectable, TXT_StrutSizeCalc, TXT_StrutDrawer, TXT_StrutKeyPress, @@ -70,7 +71,6 @@ txt_strut_t *TXT_NewStrut(int width, int height) strut = malloc(sizeof(txt_strut_t)); TXT_InitWidget(strut, &txt_strut_class); - strut->widget.selectable = 0; strut->width = width; strut->height = height; -- cgit v1.2.3