CTestMenu: clean up, change some sample comments for footer init

This commit is contained in:
2014-05-05 22:28:09 +02:00
parent d87807af67
commit 7e6ce8acc6

View File

@@ -379,7 +379,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
button->paint();
}else
button->hide();
return res;
}
else if (actionKey == "circle"){
@@ -545,15 +545,14 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
if (footer == NULL){
footer = new CComponentsFooter (100, 30, 1000, hh, CComponentsFooter::CC_BTN_HELP | CComponentsFooter::CC_BTN_EXIT | CComponentsFooter::CC_BTN_MENU |CComponentsFooter::CC_BTN_MUTE_ZAP_ACTIVE, NULL, true);
int start = 5, btnw =90, btnh = 37;
footer->showButtonContour();
footer->setButtonFont(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]);
footer->setIcon(NEUTRINO_ICON_INFO);
//add button labels with conventional button label struct
footer->setButtonLabels(TestButtons, TestButtonsCount, 0, footer->getWidth()/10);
footer->setButtonLabels(TestButtons, TestButtonsCount, 0, footer->getWidth()/6);
//also possible: use directly button name and as 2nd parameter string or locale as text
// footer->setButtonLabel(NEUTRINO_ICON_BUTTON_RED, "This is a button label text!", 0, 250);
// footer->setButtonLabel(NULL, "Test", 0, 250);
//also possible: use Button objects
// footer->addCCItem(new CComponentsButtonRed(start, 0, btnw, btnh, "Button1"));
@@ -561,6 +560,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
// footer->addCCItem(new CComponentsButtonYellow(start+=btnw, 0, btnw, btnh, "Button3"));
// footer->addCCItem(new CComponentsButtonBlue(start+=btnw, 0, btnw, btnh, "Button4"));
}
if (!footer->isPainted())
footer->paint();
else