diff options
author | Simon Howard | 2006-06-02 19:29:24 +0000 |
---|---|---|
committer | Simon Howard | 2006-06-02 19:29:24 +0000 |
commit | 517af9477b7269564f3ba8c0ccc6ef53c78a7abb (patch) | |
tree | 1d60d219a7c71b90330baee90acf06a05670fb0f /textscreen/txt_window_action.c | |
parent | b3e5170bbba1c3048da86a5291cd45524abfeac2 (diff) | |
download | chocolate-doom-517af9477b7269564f3ba8c0ccc6ef53c78a7abb.tar.gz chocolate-doom-517af9477b7269564f3ba8c0ccc6ef53c78a7abb.tar.bz2 chocolate-doom-517af9477b7269564f3ba8c0ccc6ef53c78a7abb.zip |
textscreen: Rejig how the entire drawing process works. Add a recursive
layout method that assigns the position and size of widgets for the whole
window before drawing. Add another method that responds to mouse button
presses. Allow windows to have no title bar by specifying NULL as the
title.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 547
Diffstat (limited to 'textscreen/txt_window_action.c')
-rw-r--r-- | textscreen/txt_window_action.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/textscreen/txt_window_action.c b/textscreen/txt_window_action.c index 2cffb8a6..d7b82f68 100644 --- a/textscreen/txt_window_action.c +++ b/textscreen/txt_window_action.c @@ -9,8 +9,7 @@ #include "txt_main.h" #include "txt_window.h" -static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action), - int *w, int *h) +static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action)) { TXT_CAST_ARG(txt_window_action_t, action); char buf[10]; @@ -19,11 +18,11 @@ static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action), // Minimum width is the string length + two spaces for padding - *w = strlen(action->label) + strlen(buf) + 1; - *h = 1; + action->widget.w = strlen(action->label) + strlen(buf) + 1; + action->widget.h = 1; } -static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action), int w, int selected) +static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action), int selected) { TXT_CAST_ARG(txt_window_action_t, action); int i; |