ref: 8d188ff3d11c199621c56275d4fd6730d6f63c1b
parent: 283f71d0f500541b6273316120e252b03f22fb03
author: Simon Howard <[email protected]>
date: Sun May 21 20:26:34 EDT 2006
More signals to detect when checkboxes/radiobuttons are changed. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 502
--- a/textscreen/txt_checkbox.c
+++ b/textscreen/txt_checkbox.c
@@ -71,6 +71,7 @@
if (key == KEY_ENTER || key == ' ')
{
*checkbox->variable = !*checkbox->variable;
+ TXT_EmitSignal(widget, "changed");
return 1;
}
--- a/textscreen/txt_radiobutton.c
+++ b/textscreen/txt_radiobutton.c
@@ -70,7 +70,11 @@
if (key == KEY_ENTER || key == ' ')
{
- *radiobutton->variable = radiobutton->value;
+ if (*radiobutton->variable != radiobutton->value)
+ {
+ *radiobutton->variable = radiobutton->value;
+ TXT_EmitSignal(widget, "selected");
+ }
return 1;
}