@ -3744,7 +3744,7 @@ namespace NLGUI
_TitleOpened - > setY ( pLayer - > getValSInt32 ( " title_offset_y " ) ) ;
}
_TitleOpened - > setFontSize ( pLayer - > getValSInt32 ( " title_font_size " ) ) ;
if ( _TitleClass = = TitleText ) _TitleOpened - > setText ( _TitleTextOpened ) ;
if ( _TitleClass = = TitleText ) setTitledOpenedViewText ( ) ;
_TitleOpened - > setActive ( _Opened ) ;
// Title when the container is closed
@ -3796,7 +3796,7 @@ namespace NLGUI
_TitleClosed - > setY ( pLayer - > getValSInt32 ( " title_offset_y " ) ) ;
}
_TitleClosed - > setFontSize ( pLayer - > getValSInt32 ( " title_font_size " ) ) ;
if ( _TitleClass = = TitleText ) _TitleClosed - > setText ( _TitleTextClosed ) ;
if ( _TitleClass = = TitleText ) setTitledClosedViewText ( ) ;
_TitleClosed - > setActive ( ! _Opened ) ;
@ -3946,6 +3946,15 @@ namespace NLGUI
}
}
// ***************************************************************************
void CGroupContainer : : setLocalize ( bool localize )
{
_Localize = localize ;
setTitledOpenedViewText ( ) ;
setTitledClosedViewText ( ) ;
invalidateCoords ( ) ;
}
// ***************************************************************************
std : : string CGroupContainer : : getTitle ( ) const
{
@ -3955,8 +3964,8 @@ namespace NLGUI
// ***************************************************************************
void CGroupContainer : : setTitle ( const std : : string & title )
{
if ( _Localize ) setTitleRaw ( CI18N : : get ( title ) ) ;
else setTitleRaw ( title ) ;
setTitleOpened ( title ) ;
setTitleClosed ( title ) ;
}
// ***************************************************************************
@ -3968,8 +3977,9 @@ namespace NLGUI
// ***************************************************************************
void CGroupContainer : : setTitleOpened ( const std : : string & title )
{
if ( _Localize ) setTitleOpenedRaw ( CI18N : : get ( title ) ) ;
else setTitleOpenedRaw ( title ) ;
_TitleTextOpened = title ;
setTitledOpenedViewText ( ) ;
invalidateCoords ( ) ;
}
// ***************************************************************************
@ -3981,87 +3991,69 @@ namespace NLGUI
// ***************************************************************************
void CGroupContainer : : setTitleClosed ( const std : : string & title )
{
if ( _Localize ) setTitleClosedRaw ( CI18N : : get ( title ) ) ;
else setTitleClosedRaw ( title ) ;
_TitleTextClosed = title ;
setTitledClosedViewText ( ) ;
invalidateCoords ( ) ;
}
// ***************************************************************************
void CGroupContainer : : setTitle OpenedRaw( const std : : string & title )
void CGroupContainer : : setTitle dOpenedViewText( )
{
_TitleTextOpened = title ;
if ( _TitleOpened ! = NULL )
_TitleOpened - > setText ( title ) ;
invalidateCoords ( ) ;
}
// ***************************************************************************
void CGroupContainer : : setTitleClosedRaw ( const std : : string & title )
{
_TitleTextClosed = title ;
if ( _TitleClosed ! = NULL )
_TitleClosed - > setText ( _TitleTextClosed ) ;
invalidateCoords ( ) ;
if ( _Localize & & NLMISC : : startsWith ( _TitleTextOpened , " ui " ) )
_TitleOpened - > setHardText ( _TitleTextOpened ) ;
else
_TitleOpened - > setText ( _TitleTextOpened ) ;
}
// ***************************************************************************
void CGroupContainer : : setTitleRaw ( const std : : string & title )
{
setTitleOpenedRaw ( title ) ;
setTitleClosedRaw ( title ) ;
}
// ***************************************************************************
std : : string CGroupContainer : : getTitleRaw ( ) const
void CGroupContainer : : setTitledClosedViewText ( )
{
return getTitleOpened ( ) ;
}
// ***************************************************************************
std : : string CGroupContainer : : getTitleOpenedRaw ( ) const
if ( _TitleClosed ! = NULL )
{
return _TitleTextOpened ;
if ( _Localize & & NLMISC : : startsWith ( _TitleTextClosed , " ui " ) )
_TitleClosed - > setHardText ( _TitleTextClosed ) ;
else
_TitleClosed - > setText ( _TitleTextClosed ) ;
}
// ***************************************************************************
std : : string CGroupContainer : : getTitleClosedRaw ( ) const
{
return _TitleTextClosed ;
}
// ***************************************************************************
void CGroupContainer : : setUCTitleOpened ( const ucstring & title )
{
setTitleOpened Raw ( title . toUtf8 ( ) ) ;
setTitleOpened ( title . toUtf8 ( ) ) ;
}
// ***************************************************************************
void CGroupContainer : : setUCTitleClosed ( const ucstring & title )
{
setTitleClosed Raw ( title . toUtf8 ( ) ) ;
setTitleClosed ( title . toUtf8 ( ) ) ;
}
// ***************************************************************************
void CGroupContainer : : setUCTitle ( const ucstring & title )
{
setTitle Raw ( title . toUtf8 ( ) ) ;
setTitle ( title . toUtf8 ( ) ) ;
}
// ***************************************************************************
ucstring CGroupContainer : : getUCTitle ( ) const
{
return ucstring : : makeFromUtf8 ( getTitle Raw ( ) ) ;
return ucstring : : makeFromUtf8 ( getTitle ( ) ) ;
}
// ***************************************************************************
ucstring CGroupContainer : : getUCTitleOpened ( ) const
{
return ucstring : : makeFromUtf8 ( getTitleOpened Raw ( ) ) ;
return ucstring : : makeFromUtf8 ( getTitleOpened ( ) ) ;
}
// ***************************************************************************
ucstring CGroupContainer : : getUCTitleClosed ( ) const
{
return ucstring : : makeFromUtf8 ( getTitleClosed Raw ( ) ) ;
return ucstring : : makeFromUtf8 ( getTitleClosed ( ) ) ;
}
// ***************************************************************************