mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsInfoBox: inherit setTextColor
This commit is contained in:
@@ -223,12 +223,14 @@ class CComponentsText : public CComponentsItem
|
|||||||
CBox * ct_box;
|
CBox * ct_box;
|
||||||
Font * ct_font;
|
Font * ct_font;
|
||||||
|
|
||||||
|
fb_pixel_t ct_col_text;
|
||||||
|
|
||||||
void initVarText();
|
void initVarText();
|
||||||
void clearCCText();
|
void clearCCText();
|
||||||
private:
|
private:
|
||||||
const char* ct_text;
|
const char* ct_text;
|
||||||
int ct_text_mode; //see textbox.h for possible modes
|
int ct_text_mode; //see textbox.h for possible modes
|
||||||
fb_pixel_t ct_col_text;
|
|
||||||
bool ct_text_sended;
|
bool ct_text_sended;
|
||||||
|
|
||||||
|
|
||||||
@@ -242,7 +244,8 @@ class CComponentsText : public CComponentsItem
|
|||||||
|
|
||||||
void hide(bool no_restore = false);
|
void hide(bool no_restore = false);
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
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
|
#define INFO_BOX_Y_OFFSET 2
|
||||||
@@ -260,7 +263,7 @@ class CComponentsInfoBox : public CComponentsText
|
|||||||
void paintText();
|
void paintText();
|
||||||
void initVarInfobox();
|
void initVarInfobox();
|
||||||
std::string pic_name;
|
std::string pic_name;
|
||||||
fb_pixel_t ibox_col_text;
|
|
||||||
public:
|
public:
|
||||||
CComponentsInfoBox();
|
CComponentsInfoBox();
|
||||||
CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h,
|
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);
|
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 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 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 setSpaceOffset(const int offset){x_offset = offset;};
|
||||||
inline void setPicture(const std::string& picture_name){pic_name = picture_name;};
|
inline void setPicture(const std::string& picture_name){pic_name = picture_name;};
|
||||||
|
|
||||||
|
@@ -368,7 +368,6 @@ CComponentsInfoBox::CComponentsInfoBox()
|
|||||||
initVarInfobox();
|
initVarInfobox();
|
||||||
text = NULL;
|
text = NULL;
|
||||||
text_mode = CTextBox::AUTO_WIDTH;
|
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,
|
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 = info_text;
|
||||||
text_mode = mode;
|
text_mode = mode;
|
||||||
ct_font = font_text;
|
ct_font = font_text;
|
||||||
ibox_col_text = color_text;
|
ct_col_text = color_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
CComponentsInfoBox::~CComponentsInfoBox()
|
CComponentsInfoBox::~CComponentsInfoBox()
|
||||||
@@ -465,7 +464,7 @@ void CComponentsInfoBox::paintText()
|
|||||||
//set properties
|
//set properties
|
||||||
ct_textbox->setTextFont(ct_font);
|
ct_textbox->setTextFont(ct_font);
|
||||||
ct_textbox->setWindowPos(ct_box);
|
ct_textbox->setWindowPos(ct_box);
|
||||||
ct_textbox->setTextColor(ibox_col_text);
|
ct_textbox->setTextColor(ct_col_text);
|
||||||
|
|
||||||
//set text
|
//set text
|
||||||
string new_text = static_cast <string> (text);
|
string new_text = static_cast <string> (text);
|
||||||
|
Reference in New Issue
Block a user