From e182e25e078e00329940fd053bf94a5aa40230eb Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 27 Jun 2014 00:07:44 +0200 Subject: [PATCH] text posref is now an enum too. --HG-- branch : gsoc2014-dfighter --- code/nel/src/gui/ctrl_text_button.cpp | 20 +++++++++++++------ .../gui_editor/property_browser_ctrl.cpp | 6 +++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index cdf006a51..d3a0f6765 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -149,11 +149,16 @@ namespace NLGUI } else if( name == "text_posref" ) + { + std::string pr; + pr = CInterfaceElement::HotSpotToString( _TextPosRef ); + return pr; + } + else + if( name == "text_parent_posref" ) { std::string pr; pr = CInterfaceElement::HotSpotToString( _TextParentPosRef ); - pr += " "; - pr += CInterfaceElement::HotSpotToString( _TextPosRef ); return pr; } else @@ -324,10 +329,13 @@ namespace NLGUI else if( name == "text_posref" ) { - THotSpot parent, posref; - CInterfaceElement::convertHotSpotCouple( value.c_str(), parent, posref ); - _TextPosRef = posref; - _TextParentPosRef = parent; + _TextPosRef = convertHotSpot( value.c_str() ); + return; + } + else + if( name == "text_parent_posref" ) + { + _TextParentPosRef = convertHotSpot( value.c_str() ); return; } else diff --git a/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp index 6eef4e2f6..3e25cbab8 100644 --- a/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -325,7 +325,11 @@ namespace GUIEditor e->setProperty( propName.toUtf8().constData(), v ); } else - if( ( propName == "posref" ) || ( propName == "parentposref" ) ) + if( ( propName == "posref" ) || + ( propName == "parentposref" ) || + ( propName == "text_posref" ) || + ( propName == "text_parent_posref" ) + ) { CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); if( e == NULL )