mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CTestMenu: clean up, change some sample comments for footer init
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user