More signals to detect when checkboxes/radiobuttons are changed.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 502
This commit is contained in:
parent
283f71d0f5
commit
8d188ff3d1
2 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue