|
|
|
@ -68,6 +68,7 @@ namespace NLGUI
|
|
|
|
|
_StepValue = 0;
|
|
|
|
|
_TileM = false;
|
|
|
|
|
_Frozen = false;
|
|
|
|
|
_Scale = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
@ -108,6 +109,11 @@ namespace NLGUI
|
|
|
|
|
return getTextureTopOrRight();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if( name == "scale" )
|
|
|
|
|
{
|
|
|
|
|
return toString( _Scale );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if( name == "vertical" )
|
|
|
|
|
{
|
|
|
|
|
return toString( _Vertical );
|
|
|
|
@ -244,6 +250,14 @@ namespace NLGUI
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if( name =="scale" )
|
|
|
|
|
{
|
|
|
|
|
bool b;
|
|
|
|
|
if (fromString( value, b ) )
|
|
|
|
|
_Scale = b;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if( name == "vertical" )
|
|
|
|
|
{
|
|
|
|
|
bool b;
|
|
|
|
@ -408,6 +422,7 @@ namespace NLGUI
|
|
|
|
|
xmlSetProp( node, BAD_CAST "tx_bottomleft", BAD_CAST getTextureBottomOrLeft().c_str() );
|
|
|
|
|
xmlSetProp( node, BAD_CAST "tx_middle", BAD_CAST getTextureMiddle().c_str() );
|
|
|
|
|
xmlSetProp( node, BAD_CAST "tx_topright", BAD_CAST getTextureTopOrRight().c_str() );
|
|
|
|
|
xmlSetProp( node, BAD_CAST "scale", BAD_CAST toString( _Scale ).c_str() );
|
|
|
|
|
xmlSetProp( node, BAD_CAST "vertical", BAD_CAST toString( _Vertical ).c_str() );
|
|
|
|
|
|
|
|
|
|
std::string align;
|
|
|
|
@ -480,6 +495,10 @@ namespace NLGUI
|
|
|
|
|
if(prop) setTextureTopOrRight(string((const char*)prop));
|
|
|
|
|
else setTextureTopOrRight ("w_scroll_l0_t.tga");
|
|
|
|
|
|
|
|
|
|
// Override texture size (w for vertical, h for horizontal)
|
|
|
|
|
prop = (char*) xmlGetProp( node, (xmlChar*)"scale" );
|
|
|
|
|
if (prop) _Scale = convertBool((const char*)prop);
|
|
|
|
|
|
|
|
|
|
// Read properties
|
|
|
|
|
prop = (char*) xmlGetProp( node, (xmlChar*)"vertical" );
|
|
|
|
|
if (prop) _Vertical = convertBool((const char*)prop);
|
|
|
|
@ -606,13 +625,13 @@ namespace NLGUI
|
|
|
|
|
|
|
|
|
|
if (_Vertical)
|
|
|
|
|
{
|
|
|
|
|
_W = w;
|
|
|
|
|
if (!_Scale) _W = w;
|
|
|
|
|
_H = _Target->getMaxHReal();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_W = _Target->getMaxWReal();
|
|
|
|
|
_H = h;
|
|
|
|
|
if (!_Scale) _H = h;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CCtrlBase::updateCoords ();
|
|
|
|
|