CComponentsHeader: rework constructors, add CComponentsHeaderLocalized

Member initVarHeader() now used with parameters, so it's  possible
to remove multiple code in constructors, but some class must be
renamed to CComponentsHeaderLocalized.
This commit is contained in:
2014-01-18 20:41:55 +01:00
parent 0b30c8f2c5
commit 5ea7ec48df
18 changed files with 271 additions and 140 deletions

View File

@@ -326,7 +326,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
g_RCInput->open_click();
}
if(!test) {
CComponentsHeader header(x, y, width, hheight, success ? LOCALE_SCANTS_FINISHED : LOCALE_SCANTS_FAILED, NULL /*no header icon*/);
CComponentsHeaderLocalized header(x, y, width, hheight, success ? LOCALE_SCANTS_FINISHED : LOCALE_SCANTS_FAILED);
header.paint(CC_SAVE_SCREEN_NO);
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(0xFFFF);
do {
@@ -490,7 +490,7 @@ void CScanTs::paintLine(int px, int py, int w, const char * const txt)
void CScanTs::paint(bool fortest)
{
CComponentsHeader header(x, y, width, hheight, fortest ? LOCALE_SCANTS_TEST : LOCALE_SCANTS_HEAD, NULL /*no header icon*/);
CComponentsHeaderLocalized header(x, y, width, hheight, fortest ? LOCALE_SCANTS_TEST : LOCALE_SCANTS_HEAD);
header.paint(CC_SAVE_SCREEN_NO);
frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);