name[xpos] = 0;
}
- else if (key == KSYM_Return)
+ else if (key == KSYM_Return || key == KSYM_Escape)
{
- StopTextInput();
-
- setTypeNameValues(name, pos, TRUE);
+ boolean changed = (key == KSYM_Return);
- active = FALSE;
- }
- else if (key == KSYM_Escape)
- {
StopTextInput();
- setTypeNameValues(name, pos, FALSE);
+ setTypeNameValues(name, pos, changed);
active = FALSE;
}