From 3c33475020d404cfdebfc4d0b9561a09e289091e Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 31 Jul 2012 05:56:28 +0200 Subject: [PATCH] CHANGED: #1471 Implemented property querying for CGroupModal. --- code/nel/include/nel/gui/group_modal.h | 2 + code/nel/src/gui/group_modal.cpp | 69 ++++++++++++++++++ .../plugins/gui_editor/widgets/GroupModal.xml | 72 +++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml diff --git a/code/nel/include/nel/gui/group_modal.h b/code/nel/include/nel/gui/group_modal.h index bf8690cb9..efd31c4af 100644 --- a/code/nel/include/nel/gui/group_modal.h +++ b/code/nel/include/nel/gui/group_modal.h @@ -53,6 +53,8 @@ namespace NLGUI /// Constructor CGroupModal(const TCtorParam ¶m); + std::string getProperty( const std::string &name ) const; + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual void updateCoords (); void setBaseX(sint32 x) { _MouseDeltaX = x;} diff --git a/code/nel/src/gui/group_modal.cpp b/code/nel/src/gui/group_modal.cpp index 22a9956f5..5cd79bd1e 100644 --- a/code/nel/src/gui/group_modal.cpp +++ b/code/nel/src/gui/group_modal.cpp @@ -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) { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml new file mode 100644 index 000000000..bdb5b715b --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml @@ -0,0 +1,72 @@ + +
+ GroupModal + CGroupModal + GroupFrame + + false + +
+ + + mouse_pos + bool + true + + + exit_click_out + bool + true + + + exit_click_l + bool + false + + + exit_click_r + bool + false + + + exit_click_b + bool + false + + + force_inside_screen + bool + false + + + category + string + + + + onclick_out + string + + + + onclick_out_params + + + + + onpostclick_out + string + + + + onpostclick_out_params + string + + + + exit_key_pushed + bool + false + + +