Try to rework footer

* try to fix enableButtonShadow(), seems an init is missing
* shadow fixed
This commit is contained in:
2016-09-24 00:52:59 +02:00
parent eb78743e4a
commit 2e631fd0ce
9 changed files with 152 additions and 81 deletions

View File

@@ -370,9 +370,10 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
#endif
else if (actionKey == "button"){
if (button == NULL){
button = new CComponentsButtonRed(100, 100, 100, 50, "Test");
button = new CComponentsButtonRed(100, 100, 100, 50, "Test", NULL, false, true, CC_SHADOW_OFF);
button->enableShadow();
}
}else
button->disableShadow();
if (!button->isPainted()){
@@ -560,7 +561,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
footer->setIcon(NEUTRINO_ICON_INFO);
//add button labels with conventional button label struct
footer->setButtonLabels(TestButtons, TestButtonsCount, 0, footer->getWidth()/6);
footer->setButtonLabels(TestButtons, TestButtonsCount, 0, footer->getWidth()/TestButtonsCount);
//also possible: use directly button name and as 2nd parameter string or locale as text
// footer->setButtonLabel(NULL, "Test", 0, 250);