diff --git a/code/nel/include/nel/gui/view_text.h b/code/nel/include/nel/gui/view_text.h
index 3625ef0e6..13355c5b8 100644
--- a/code/nel/include/nel/gui/view_text.h
+++ b/code/nel/include/nel/gui/view_text.h
@@ -55,6 +55,7 @@ namespace NLGUI
CViewText &operator=(const CViewText &vt);
std::string getProperty( const std::string &name ) const;
+ std::string getTextProperty( const std::string &name ) const;
void setProperty( const std::string &name, const std::string &value );
bool setTextProperty( const std::string &name, const std::string &value );
bool serializeTextOptions( xmlNodePtr node ) const;
diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp
index 27785248b..408e87afe 100644
--- a/code/nel/src/gui/ctrl_text_button.cpp
+++ b/code/nel/src/gui/ctrl_text_button.cpp
@@ -62,6 +62,13 @@ namespace NLGUI
std::string CCtrlTextButton::getProperty( const std::string &name ) const
{
+ std::string prop;
+ if( _ViewText != NULL )
+ prop = _ViewText->getTextProperty( name );
+
+ if( !prop.empty() )
+ return prop;
+ else
if( name == "tx_normal" )
{
std::string tex;
@@ -191,6 +198,15 @@ namespace NLGUI
void CCtrlTextButton::setProperty( const std::string &name, const std::string &value )
{
+ if( _ViewText != NULL )
+ {
+ if( _ViewText->setTextProperty( name, value ) )
+ {
+ _ViewText->invalidateContent();
+ return;
+ }
+ }
+
if( name == "tx_normal" )
{
std::string tex;
diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp
index 64a6ec51a..f9c5d1f79 100644
--- a/code/nel/src/gui/view_text.cpp
+++ b/code/nel/src/gui/view_text.cpp
@@ -177,6 +177,27 @@ namespace NLGUI
}
std::string CViewText::getProperty( const std::string &name ) const
+ {
+ std::string prop = getTextProperty( name );
+
+ if( !prop.empty() )
+ return prop;
+ else
+ if( name == "hardtext" )
+ {
+ return _Text.toString();
+ }
+ else
+ if( name == "hardtext_format" )
+ {
+ return _HardtextFormat;
+ }
+ else
+ return CViewBase::getProperty( name );
+ }
+
+
+ std::string CViewText::getTextProperty( const std::string &name ) const
{
if( name == "color" )
{
@@ -290,17 +311,7 @@ namespace NLGUI
return toString( _ContinuousUpdate );
}
else
- if( name == "hardtext" )
- {
- return _Text.toString();
- }
- else
- if( name == "hardtext_format" )
- {
- return _HardtextFormat;
- }
- else
- return CViewBase::getProperty( name );
+ return "";
}
void CViewText::setProperty( const std::string &name, const std::string &value )
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml
index f66c500b1..2458f6f3b 100644
--- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml
+++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml
@@ -113,5 +113,95 @@
bool
false
+
+ color
+ string
+ 255 255 255 255
+
+
+ global_color
+ bool
+ false
+
+
+ fontsize
+ int
+ 12
+
+
+ shadow
+ bool
+ false
+
+
+ shadow_color
+ string
+ 0 0 0 255
+
+
+ multi_line
+ bool
+ false
+
+
+ justification
+ string
+ dont_clip_word
+
+
+ line_maxw
+ int
+ 0
+
+
+ multi_line_space
+ int
+ 8
+
+
+ multi_line_maxw_only
+ bool
+ false
+
+
+ multi_max_line
+ int
+ 0
+
+
+ underlined
+ bool
+ false
+
+
+ case_mode
+ int
+ 0
+
+
+ over_extend_view_text
+ bool
+ false
+
+
+ over_extend_parent_rect
+ bool
+ false
+
+
+ clamp_right
+ bool
+ true
+
+
+ auto_clamp_offset
+ int
+ 0
+
+
+ continuous_update
+ bool
+ false
+