diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 91371e9ce..78cf42000 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -223,12 +223,14 @@ class CComponentsText : public CComponentsItem CBox * ct_box; Font * ct_font; + fb_pixel_t ct_col_text; + void initVarText(); void clearCCText(); private: const char* ct_text; int ct_text_mode; //see textbox.h for possible modes - fb_pixel_t ct_col_text; + bool ct_text_sended; @@ -242,7 +244,8 @@ class CComponentsText : public CComponentsItem void hide(bool no_restore = false); void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); - void setTextFont(Font* font_text){ct_font = font_text;}; + inline void setTextFont(Font* font_text){ct_font = font_text;}; + virtual inline void setTextColor(fb_pixel_t color_text){ ct_col_text = color_text;}; }; #define INFO_BOX_Y_OFFSET 2 @@ -260,7 +263,7 @@ class CComponentsInfoBox : public CComponentsText void paintText(); void initVarInfobox(); std::string pic_name; - fb_pixel_t ibox_col_text; + public: CComponentsInfoBox(); CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h, @@ -275,7 +278,7 @@ class CComponentsInfoBox : public CComponentsText void setText(neutrino_locale_t locale_text, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL); inline void setTextMode(const int mode){text_mode = mode;};//see textbox.h for possible modes inline void setTextFont(Font* font_text){ct_font = font_text;}; - inline void setTextColor(fb_pixel_t color_text){ ibox_col_text = color_text;}; +// inline void setTextColor(fb_pixel_t color_text){ ibox_col_text = color_text;}; inline void setSpaceOffset(const int offset){x_offset = offset;}; inline void setPicture(const std::string& picture_name){pic_name = picture_name;}; diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index 7ed996d9a..3dd92255e 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -368,7 +368,6 @@ CComponentsInfoBox::CComponentsInfoBox() initVarInfobox(); text = NULL; text_mode = CTextBox::AUTO_WIDTH; - ibox_col_text = COL_MENUCONTENT; } CComponentsInfoBox::CComponentsInfoBox(const int x_pos, const int y_pos, const int w, const int h, @@ -393,7 +392,7 @@ CComponentsInfoBox::CComponentsInfoBox(const int x_pos, const int y_pos, const i text = info_text; text_mode = mode; ct_font = font_text; - ibox_col_text = color_text; + ct_col_text = color_text; } CComponentsInfoBox::~CComponentsInfoBox() @@ -465,7 +464,7 @@ void CComponentsInfoBox::paintText() //set properties ct_textbox->setTextFont(ct_font); ct_textbox->setWindowPos(ct_box); - ct_textbox->setTextColor(ibox_col_text); + ct_textbox->setTextColor(ct_col_text); //set text string new_text = static_cast (text);