CComponentsInfoBox: add basic constructor without args

usefull if dynamic changed properties are needed
This commit is contained in:
2012-08-22 10:42:40 +02:00
parent 2101a32862
commit 9aa0d14d39
2 changed files with 23 additions and 4 deletions

View File

@@ -206,6 +206,7 @@ class CComponentsInfoBox : public CComponentsContainer
std::string pic_name;
fb_pixel_t col_text;
public:
CComponentsInfoBox();
CComponentsInfoBox( const int x_pos, const int y_pos, const int w, const int h,
const char* info_text = "", const int mode = CTextBox::AUTO_WIDTH, Font* font_text = NULL,
bool has_shadow = CC_SHADOW_OFF,

View File

@@ -260,6 +260,26 @@ void CComponentsContainer::syncSysColors()
//-------------------------------------------------------------------------------------------------------
//sub class CComponentsInfoBox from CComponentsContainer
CComponentsInfoBox::CComponentsInfoBox()
{
//CComponentsInfoBox
initVarInfobox();
text = NULL;
text_mode = CTextBox::AUTO_WIDTH;
font = NULL;
col_text = COL_MENUCONTENT;
//CComponents
x = 0;
y = 0;
width = 120;
height = 240;
shadow = CC_SHADOW_OFF;
col_frame = COL_MENUCONTENT_PLUS_6;
col_body = COL_MENUCONTENT_PLUS_0;
col_shadow = COL_MENUCONTENTDARK_PLUS_0;
}
CComponentsInfoBox::CComponentsInfoBox(const int x_pos, const int y_pos, const int w, const int h,
const char* info_text, const int mode, Font* font_text,
bool has_shadow,
@@ -281,8 +301,6 @@ CComponentsInfoBox::CComponentsInfoBox(const int x_pos, const int y_pos, const i
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;
}
CComponentsInfoBox::~CComponentsInfoBox()