diff --git a/code/nel/include/nel/gui/group_modal.h b/code/nel/include/nel/gui/group_modal.h index efd31c4af..83e3a217a 100644 --- a/code/nel/include/nel/gui/group_modal.h +++ b/code/nel/include/nel/gui/group_modal.h @@ -54,6 +54,7 @@ namespace NLGUI CGroupModal(const TCtorParam ¶m); std::string getProperty( const std::string &name ) const; + void setProperty( const std::string &name, const std::string &value ); virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual void updateCoords (); diff --git a/code/nel/src/gui/group_modal.cpp b/code/nel/src/gui/group_modal.cpp index 5cd79bd1e..edbb3c11e 100644 --- a/code/nel/src/gui/group_modal.cpp +++ b/code/nel/src/gui/group_modal.cpp @@ -114,6 +114,99 @@ namespace NLGUI return CGroupFrame::getProperty( name ); } + void CGroupModal::setProperty( const std::string &name, const std::string &value ) + { + if( name == "mouse_pos" ) + { + bool b; + if( NLMISC::fromString( value, b ) ) + SpawnOnMousePos = b; + return; + } + else + if( name == "exit_click_out" ) + { + bool b; + if( NLMISC::fromString( value, b ) ) + ExitClickOut = b; + return; + } + else + if( name == "exit_click_l" ) + { + bool b; + if( NLMISC::fromString( value, b ) ) + ExitClickL = b; + return; + } + else + if( name == "exit_click_r" ) + { + bool b; + if( NLMISC::fromString( value, b ) ) + ExitClickR = b; + return; + } + else + if( name == "exit_click_b" ) + { + bool b; + if( NLMISC::fromString( value, b ) ) + { + ExitClickL = ExitClickR = b; + } + return; + } + else + if( name == "force_inside_screen" ) + { + bool b; + if( NLMISC::fromString( value, b ) ) + ForceInsideScreen = b; + return; + } + else + if( name == "category" ) + { + Category = value; + return; + } + else + if( name == "onclick_out" ) + { + OnClickOut = value; + return; + } + else + if( name == "onclick_out_params" ) + { + OnClickOutParams = value; + return; + } + else + if( name == "onpostclick_out" ) + { + OnPostClickOut = value; + return; + } + else + if( name == "onpostclick_out_params" ) + { + OnPostClickOutParams = value; + return; + } + else + if( name == "exit_key_pushed" ) + { + bool b; + if( NLMISC::fromString( value, b ) ) + ExitKeyPushed = b; + return; + } + else + CGroupFrame::setProperty( name, value ); + } + // *************************************************************************** bool CGroupModal::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)