CHANGED: #1471 Implemented property querying for CGroupModal.

--HG--
branch : gsoc2012-gui-editor
This commit is contained in:
dfighter1985 2012-07-31 05:56:28 +02:00
parent 7efbd2ff7e
commit d3fb86cc22
3 changed files with 143 additions and 0 deletions

View file

@ -53,6 +53,8 @@ namespace NLGUI
/// Constructor /// Constructor
CGroupModal(const TCtorParam &param); CGroupModal(const TCtorParam &param);
std::string getProperty( const std::string &name ) const;
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
virtual void updateCoords (); virtual void updateCoords ();
void setBaseX(sint32 x) { _MouseDeltaX = x;} void setBaseX(sint32 x) { _MouseDeltaX = x;}

View file

@ -46,6 +46,75 @@ namespace NLGUI
} }
std::string CGroupModal::getProperty( const std::string &name ) const
{
if( name == "mouse_pos" )
{
return NLMISC::toString( SpawnOnMousePos );
}
else
if( name == "exit_click_out" )
{
return NLMISC::toString( ExitClickOut );
}
else
if( name == "exit_click_l" )
{
return NLMISC::toString( ExitClickL );
}
else
if( name == "exit_click_r" )
{
return NLMISC::toString( ExitClickR );
}
else
if( name == "exit_click_b" )
{
if( ExitClickL == ExitClickR )
return NLMISC::toString( ExitClickL );
else
return "false";
}
else
if( name == "force_inside_screen" )
{
return NLMISC::toString( ForceInsideScreen );
}
else
if( name == "category" )
{
return Category;
}
else
if( name == "onclick_out" )
{
return OnClickOut;
}
else
if( name == "onclick_out_params" )
{
return OnClickOutParams;
}
else
if( name == "onpostclick_out" )
{
return OnPostClickOut;
}
else
if( name == "onpostclick_out_params" )
{
return OnPostClickOutParams;
}
else
if( name == "exit_key_pushed" )
{
return NLMISC::toString( ExitKeyPushed );
}
else
return CGroupFrame::getProperty( name );
}
// *************************************************************************** // ***************************************************************************
bool CGroupModal::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) bool CGroupModal::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
{ {

View file

@ -0,0 +1,72 @@
<widget>
<header>
<name>GroupModal</name>
<guiname>CGroupModal</guiname>
<ancestor>GroupFrame</ancestor>
<description></description>
<abstract>false</abstract>
<icon></icon>
</header>
<properties>
<property>
<name>mouse_pos</name>
<type>bool</type>
<default>true</default>
</property>
<property>
<name>exit_click_out</name>
<type>bool</type>
<default>true</default>
</property>
<property>
<name>exit_click_l</name>
<type>bool</type>
<default>false</default>
</property>
<property>
<name>exit_click_r</name>
<type>bool</type>
<default>false</default>
</property>
<property>
<name>exit_click_b</name>
<type>bool</type>
<default>false</default>
</property>
<property>
<name>force_inside_screen</name>
<type>bool</type>
<default>false</default>
</property>
<property>
<name>category</name>
<type>string</type>
<default></default>
</property>
<property>
<name>onclick_out</name>
<type>string</type>
<default></default>
</property>
<property>
<name>onclick_out_params</name>
<type></type>
<default></default>
</property>
<property>
<name>onpostclick_out</name>
<type>string</type>
<default></default>
</property>
<property>
<name>onpostclick_out_params</name>
<type>string</type>
<default></default>
</property>
<property>
<name>exit_key_pushed</name>
<type>bool</type>
<default>false</default>
</property>
</properties>
</widget>