diff options
author | Simon Howard | 2006-05-20 15:15:17 +0000 |
---|---|---|
committer | Simon Howard | 2006-05-20 15:15:17 +0000 |
commit | f761f821f95a3fbf8af1eb645d8ae9412abdc541 (patch) | |
tree | c6699ce7a4487043391ee014bca9582bf29b7559 /textscreen/txt_button.c | |
parent | c63afd766a9fdb19bc2c3a650f859bbba4699e8f (diff) | |
download | chocolate-doom-f761f821f95a3fbf8af1eb645d8ae9412abdc541.tar.gz chocolate-doom-f761f821f95a3fbf8af1eb645d8ae9412abdc541.tar.bz2 chocolate-doom-f761f821f95a3fbf8af1eb645d8ae9412abdc541.zip |
Add selectable and visible properties to widgets. Allow the position of
windows to be set based on position of top/bottom/center,left/right,center
coordinates.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 486
Diffstat (limited to 'textscreen/txt_button.c')
-rw-r--r-- | textscreen/txt_button.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c index 93af5297..ba6f387a 100644 --- a/textscreen/txt_button.c +++ b/textscreen/txt_button.c @@ -48,10 +48,15 @@ static void TXT_ButtonDestructor(txt_widget_t *widget) free(button->label); } +static int TXT_ButtonKeyPress(txt_widget_t *widget, int key) +{ +} + txt_widget_class_t txt_button_class = { TXT_ButtonSizeCalc, TXT_ButtonDrawer, + TXT_ButtonKeyPress, TXT_ButtonDestructor, }; @@ -62,6 +67,8 @@ txt_button_t *TXT_NewButton(char *label) button = malloc(sizeof(txt_button_t)); button->widget.widget_class = &txt_button_class; + button->widget.selectable = 1; + button->widget.visible = 1; button->label = strdup(label); return button; |