|
|
@ -304,13 +304,21 @@ namespace NLGUI
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CViewText::setProperty( const std::string &name, const std::string &value )
|
|
|
|
void CViewText::setProperty( const std::string &name, const std::string &value )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if( setTextProperty( name, value ) )
|
|
|
|
|
|
|
|
invalidateContent();
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
CViewBase::setProperty( name, value );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool CViewText::setTextProperty( const std::string &name, const std::string &value )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( name == "color" )
|
|
|
|
if( name == "color" )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CRGBA c;
|
|
|
|
CRGBA c;
|
|
|
|
if( fromString( value, c ) )
|
|
|
|
if( fromString( value, c ) )
|
|
|
|
_Color = c;
|
|
|
|
_Color = c;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "global_color" )
|
|
|
|
if( name == "global_color" )
|
|
|
@ -318,7 +326,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_ModulateGlobalColor = b;
|
|
|
|
_ModulateGlobalColor = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "fontsize" )
|
|
|
|
if( name == "fontsize" )
|
|
|
@ -326,7 +334,7 @@ namespace NLGUI
|
|
|
|
sint i;
|
|
|
|
sint i;
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
_FontSize = i + CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32();
|
|
|
|
_FontSize = i + CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32();
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "shadow" )
|
|
|
|
if( name == "shadow" )
|
|
|
@ -334,7 +342,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_Shadow = b;
|
|
|
|
_Shadow = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "shadow_color" )
|
|
|
|
if( name == "shadow_color" )
|
|
|
@ -342,7 +350,7 @@ namespace NLGUI
|
|
|
|
CRGBA c;
|
|
|
|
CRGBA c;
|
|
|
|
if( fromString( value, c ) )
|
|
|
|
if( fromString( value, c ) )
|
|
|
|
_ShadowColor = c;
|
|
|
|
_ShadowColor = c;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "multi_line" )
|
|
|
|
if( name == "multi_line" )
|
|
|
@ -350,7 +358,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_MultiLine = b;
|
|
|
|
_MultiLine = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "justification" )
|
|
|
|
if( name == "justification" )
|
|
|
@ -364,7 +372,7 @@ namespace NLGUI
|
|
|
|
if( value == "justified" )
|
|
|
|
if( value == "justified" )
|
|
|
|
_TextMode = Justified;
|
|
|
|
_TextMode = Justified;
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "line_maxw" )
|
|
|
|
if( name == "line_maxw" )
|
|
|
@ -372,7 +380,7 @@ namespace NLGUI
|
|
|
|
sint32 i;
|
|
|
|
sint32 i;
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
_LineMaxW = i;
|
|
|
|
_LineMaxW = i;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "multi_line_space" )
|
|
|
|
if( name == "multi_line_space" )
|
|
|
@ -380,7 +388,7 @@ namespace NLGUI
|
|
|
|
sint i;
|
|
|
|
sint i;
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
_MultiLineSpace = i;
|
|
|
|
_MultiLineSpace = i;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "multi_line_maxw_only" )
|
|
|
|
if( name == "multi_line_maxw_only" )
|
|
|
@ -388,7 +396,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_MultiLineMaxWOnly = b;
|
|
|
|
_MultiLineMaxWOnly = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "multi_max_line" )
|
|
|
|
if( name == "multi_max_line" )
|
|
|
@ -396,7 +404,7 @@ namespace NLGUI
|
|
|
|
uint32 i;
|
|
|
|
uint32 i;
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
_MultiMaxLine = i;
|
|
|
|
_MultiMaxLine = i;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "underlined" )
|
|
|
|
if( name == "underlined" )
|
|
|
@ -404,7 +412,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_Underlined = b;
|
|
|
|
_Underlined = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "case_mode" )
|
|
|
|
if( name == "case_mode" )
|
|
|
@ -412,7 +420,7 @@ namespace NLGUI
|
|
|
|
uint32 i;
|
|
|
|
uint32 i;
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
_CaseMode = (TCaseMode)i;
|
|
|
|
_CaseMode = (TCaseMode)i;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "over_extend_view_text" )
|
|
|
|
if( name == "over_extend_view_text" )
|
|
|
@ -420,7 +428,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_OverExtendViewText = b;
|
|
|
|
_OverExtendViewText = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "over_extend_parent_rect" )
|
|
|
|
if( name == "over_extend_parent_rect" )
|
|
|
@ -428,7 +436,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_OverExtendViewTextUseParentRect = b;
|
|
|
|
_OverExtendViewTextUseParentRect = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "auto_clamp" )
|
|
|
|
if( name == "auto_clamp" )
|
|
|
@ -436,7 +444,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_AutoClamp = b;
|
|
|
|
_AutoClamp = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "clamp_right" )
|
|
|
|
if( name == "clamp_right" )
|
|
|
@ -444,7 +452,7 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_ClampRight = b;
|
|
|
|
_ClampRight = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "auto_clamp_offset" )
|
|
|
|
if( name == "auto_clamp_offset" )
|
|
|
@ -452,7 +460,7 @@ namespace NLGUI
|
|
|
|
uint8 i;
|
|
|
|
uint8 i;
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
if( fromString( value, i ) )
|
|
|
|
_AutoClampOffset = i;
|
|
|
|
_AutoClampOffset = i;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "continuous_update" )
|
|
|
|
if( name == "continuous_update" )
|
|
|
@ -460,22 +468,30 @@ namespace NLGUI
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
_ContinuousUpdate = b;
|
|
|
|
_ContinuousUpdate = b;
|
|
|
|
return;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "hardtext" )
|
|
|
|
if( name == "hardtext" )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_Text = value;
|
|
|
|
_Text = value;
|
|
|
|
return;
|
|
|
|
setCase( _Text, _CaseMode );
|
|
|
|
|
|
|
|
invalidateContent();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if( name == "hardtext_format" )
|
|
|
|
if( name == "hardtext_format" )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_HardtextFormat = value;
|
|
|
|
_HardtextFormat = value;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if( _MultiLine )
|
|
|
|
|
|
|
|
setTextFormatTaged( _HardtextFormat );
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
setSingleLineTextFormatTaged( _HardtextFormat );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
CViewBase::setProperty( name, value );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|