diff options
author | Simon Howard | 2006-05-22 00:26:34 +0000 |
---|---|---|
committer | Simon Howard | 2006-05-22 00:26:34 +0000 |
commit | 8d188ff3d11c199621c56275d4fd6730d6f63c1b (patch) | |
tree | 24116fcf47e57d72430b1fc6233fcab5bbe26aff | |
parent | 283f71d0f500541b6273316120e252b03f22fb03 (diff) | |
download | chocolate-doom-8d188ff3d11c199621c56275d4fd6730d6f63c1b.tar.gz chocolate-doom-8d188ff3d11c199621c56275d4fd6730d6f63c1b.tar.bz2 chocolate-doom-8d188ff3d11c199621c56275d4fd6730d6f63c1b.zip |
More signals to detect when checkboxes/radiobuttons are changed.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 502
-rw-r--r-- | textscreen/txt_checkbox.c | 1 | ||||
-rw-r--r-- | textscreen/txt_radiobutton.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/textscreen/txt_checkbox.c b/textscreen/txt_checkbox.c index f33781c1..a61822eb 100644 --- a/textscreen/txt_checkbox.c +++ b/textscreen/txt_checkbox.c @@ -71,6 +71,7 @@ static int TXT_CheckBoxKeyPress(txt_widget_t *widget, int key) if (key == KEY_ENTER || key == ' ') { *checkbox->variable = !*checkbox->variable; + TXT_EmitSignal(widget, "changed"); return 1; } diff --git a/textscreen/txt_radiobutton.c b/textscreen/txt_radiobutton.c index 45412f28..c0a87455 100644 --- a/textscreen/txt_radiobutton.c +++ b/textscreen/txt_radiobutton.c @@ -70,7 +70,11 @@ static int TXT_RadioButtonKeyPress(txt_widget_t *widget, int key) if (key == KEY_ENTER || key == ' ') { - *radiobutton->variable = radiobutton->value; + if (*radiobutton->variable != radiobutton->value) + { + *radiobutton->variable = radiobutton->value; + TXT_EmitSignal(widget, "selected"); + } return 1; } |