diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 94810c992..11c08b014 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -50,6 +50,7 @@ CComponents::CComponents() : COSDFader(g_settings.theme.menu_Content_alpha) col_frame_sel = COL_MENUCONTENTSELECTED_PLUS_0; corner_type = CORNER_ALL; corner_rad = 0; + cc_tag = NULL; shadow = CC_SHADOW_OFF; shadow_w = SHADOW_OFFSET; fr_thickness = 0; diff --git a/src/gui/components/cc_base.h b/src/gui/components/cc_base.h index 106d11c2e..e7840fe83 100644 --- a/src/gui/components/cc_base.h +++ b/src/gui/components/cc_base.h @@ -67,7 +67,8 @@ class CComponents : public CComponentsSignals, public COSDFader int corner_type; ///property: defined radius of corner, without effect, if corner_type=0 int corner_rad; - + ///property: tag for component, can contain any value if required, default value is NULL, you can fill with a cast, see also setTag() and getTag() + void *cc_tag; ///property: color of body fb_pixel_t col_body; ///property: color of shadow @@ -164,6 +165,11 @@ class CComponents : public CComponentsSignals, public COSDFader ///return/set (pass through) position and dimensions of component at once inline virtual void getDimensions(int* xpos, int* ypos, int* w, int* h){*xpos=x; *ypos=y; *w=width; *h=height;}; + ///sets tag as void*, see also cc_tag + virtual void setTag(void* tag){cc_tag = tag;}; + ///gets tag as void*, see also cc_tag + inline virtual void* getTag(){return cc_tag;}; + ///set frame color inline virtual void setColorFrame(fb_pixel_t color){col_frame = color;}; ///set selected frame color