More signals to detect when checkboxes/radiobuttons are changed.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 502
This commit is contained in:
Simon Howard 2006-05-22 00:26:34 +00:00
parent 283f71d0f5
commit 8d188ff3d1
2 changed files with 6 additions and 1 deletions

View file

@ -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;
}

View file

@ -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;
}