CComponents: epand method setFrameThickness() to change selected frame

This commit is contained in:
2014-06-13 20:34:09 +02:00
committed by svenhoefer
parent 2f0e4e1687
commit 8bbd7024d9
2 changed files with 11 additions and 3 deletions

View File

@@ -282,3 +282,11 @@ inline void CComponents::setYPos(const int& ypos)
{
y = ypos;
}
void CComponents::setFrameThickness(const int& thickness, const int& thickness_sel)
{
fr_thickness = thickness;
if (fr_thickness_sel != thickness_sel)
fr_thickness_sel = thickness_sel;
}

View File

@@ -81,9 +81,9 @@ class CComponents : public COSDFader
///property: width of shadow
int shadow_w;
///property: frame thickness
///property: frame thickness, see also setFrameThickness()
int fr_thickness;
///property: frame thickness of selected component
///property: frame thickness of selected component, see also setFrameThickness()
int fr_thickness_sel;
///status: true=component was painted for 1st time
@@ -194,7 +194,7 @@ class CComponents : public COSDFader
inline virtual int getCornerRadius(){return corner_rad;};
///set frame thickness
inline virtual void setFrameThickness(const int& thickness){fr_thickness = thickness;};
virtual void setFrameThickness(const int& thickness, const int& thickness_sel = 3);
///switch shadow on/off
///Note: it's recommended to use #defines: CC_SHADOW_ON=true or CC_SHADOW_OFF=false as parameter, see also cc_types.h
inline virtual void setShadowOnOff(bool has_shadow){shadow = has_shadow;};