mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsText: fix paint text into Textbox
This commit is contained in:
@@ -226,28 +226,25 @@ class CComponentsText : public CComponentsItem
|
||||
fb_pixel_t ct_col_text;
|
||||
int ct_text_mode; //see textbox.h for possible modes
|
||||
const char* ct_text;
|
||||
bool ct_text_sent;
|
||||
|
||||
void initVarText();
|
||||
void clearCCText();
|
||||
private:
|
||||
bool ct_text_sended;
|
||||
|
||||
void initCCText();
|
||||
|
||||
void paintText(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
public:
|
||||
CComponentsText();
|
||||
~CComponentsText();
|
||||
|
||||
// inline void setText(const char* text, const int text_mode=~CTextBox::AUTO_WIDTH, Font* font_text=NULL){ct_text = text; ct_text_mode = text_mode, ct_font = font_text;};
|
||||
|
||||
void hide(bool no_restore = false);
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
|
||||
virtual inline void setTextFont(Font* font_text){ct_font = font_text;};
|
||||
virtual inline void setTextColor(fb_pixel_t color_text){ ct_col_text = color_text;};
|
||||
virtual inline void setTextMode(const int mode){ct_text_mode = mode;};//see textbox.h for possible modes
|
||||
virtual inline void setText(const char* ctext, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL){ct_text = ctext; ct_text_mode = mode, ct_font = font_text;};
|
||||
virtual inline void setText(const std::string& stext, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL){ct_text = stext.c_str(); ct_text_mode = mode, ct_font = font_text;};
|
||||
virtual void setText(neutrino_locale_t locale_text, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
virtual inline void setText(const char* ctext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL){ct_text = ctext; ct_text_mode = mode, ct_font = font_text;};
|
||||
virtual inline void setText(const std::string& stext, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL){ct_text = stext.c_str(); ct_text_mode = mode, ct_font = font_text;};
|
||||
virtual void setText(neutrino_locale_t locale_text, const int mode = ~CTextBox::AUTO_WIDTH, Font* font_text = NULL);
|
||||
};
|
||||
|
||||
#define INFO_BOX_Y_OFFSET 2
|
||||
@@ -260,7 +257,7 @@ class CComponentsInfoBox : public CComponentsText
|
||||
std::string pic_default_name;
|
||||
|
||||
void paintPicture();
|
||||
void paintText();
|
||||
// void paintText();
|
||||
void initVarInfobox();
|
||||
std::string pic_name;
|
||||
|
||||
@@ -273,12 +270,6 @@ class CComponentsInfoBox : public CComponentsText
|
||||
|
||||
~CComponentsInfoBox();
|
||||
|
||||
// inline void setText(const char* info_text, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL){text = info_text; ct_text_mode = mode, ct_font = font_text;};
|
||||
// inline void setText(const std::string& info_text, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL){text = info_text.c_str(); ct_text_mode = mode, ct_font = font_text;};
|
||||
// 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 setSpaceOffset(const int offset){x_offset = offset;};
|
||||
inline void setPicture(const std::string& picture_name){pic_name = picture_name;};
|
||||
|
||||
|
Reference in New Issue
Block a user