CHANGED: #1471 CGroupEditBox action handlers will now be retrievable, even if the action handler couldn't be found at the time of parsing.

This commit is contained in:
dfighter1985 2012-08-20 01:50:13 +02:00
parent 5a651e0a21
commit 47d565db8b

View file

@ -439,7 +439,6 @@ namespace NLGUI
return NULL;
xmlSetProp( node, BAD_CAST "type", BAD_CAST "edit_box" );
xmlSetProp( node, BAD_CAST "onchange", BAD_CAST _AHOnChange.c_str() );
xmlSetProp( node, BAD_CAST "onchange_params", BAD_CAST _ParamsOnChange.c_str() );
xmlSetProp( node, BAD_CAST "on_focus_lost", BAD_CAST _AHOnFocusLost.c_str() );
@ -535,6 +534,13 @@ namespace NLGUI
// NB: use InterfaceGroup "OnEnter" data. Different script params for an historic reason
CAHManager::getInstance()->parseAH(cur, "onenter", "params", _AHOnEnter, _AHOnEnterParams);
if( editorMode )
{
prop = (char*) xmlGetProp( cur, BAD_CAST "onenter" );
if( prop != NULL )
mapAHString( "onenter", std::string( prop ) );
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"onchange" );
if (prop) _AHOnChange = (const char *) prop;
prop = (char*) xmlGetProp( cur, (xmlChar*)"onchange_params" );