CComponents: Rework some buggy paint methodes

Origin commit data
------------------
Branch: ni/coolstream
Commit: 9090e41d5b
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-08-18 (Sat, 18 Aug 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2012-08-18 01:14:02 +02:00
parent 29ec5c53e2
commit d8fea8f899
2 changed files with 71 additions and 31 deletions

View File

@@ -180,7 +180,7 @@ class CComponentsPicture : public CComponentsContainer
void setPicturePaintBackground(bool paintBg){pic_paintBg = paintBg;};
void setPicture(const std::string& picture_name);
void setPictureAlign(const int alignment);
bool isPainted(){return pic_painted;};
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
void getPictureSize(int *pwidth, int *pheight){*pwidth=pic_width; *pheight=pic_height;};
@@ -193,31 +193,35 @@ class CComponentsInfoBox : public CComponentsContainer
private:
const char* text;
int text_mode; //see textbox.h for possible modes
int x_text;
int x_text, x_offset;
Font* font;
CBox * box;
CTextBox * textbox;
CComponentsPicture * pic;
std::string pic_default_name;
void paintPicture();
void paintText();
void initVarInfobox();
std::string pic_name;
fb_pixel_t col_text;
public:
CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h,
const char* info_text = NULL, const int mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, Font* font_text = NULL,
bool has_shadow = CC_SHADOW_OFF,
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
fb_pixel_t color_text = COL_MENUCONTENT, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
~CComponentsInfoBox();
void setText(const char* info_text, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL){text = info_text; text_mode = mode, font = font_text;};
void setText(const std::string& info_text, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL){text = info_text.c_str(); text_mode = mode, font = font_text;};
void setText(neutrino_locale_t locale_text, const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL);
void setTextMode(const int mode){text_mode = mode;};
void setText(const char* info_text, const int mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, Font* font_text = NULL){text = info_text; text_mode = mode, font = font_text;};
void setText(const std::string& info_text, const int mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, Font* font_text = NULL){text = info_text.c_str(); text_mode = mode, font = font_text;};
void setText(neutrino_locale_t locale_text, const int mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, Font* font_text = NULL);
void setTextMode(const int mode){text_mode = mode;};//see textbox.h for possible modes
void setTextFont(Font* font_text){font = font_text;};
void setTextColor(fb_pixel_t color_text){ col_text = color_text;};
void setSpaceOffset(const int offset){x_offset = offset;};
void setPicture(const std::string& picture_name){pic_name = picture_name;};
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
};