mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
menu: add possibility to add a footer to the menus; fix alignment of menus
add footer-keys to testmenu
(some of this code is based on code by martii; thx)
Origin commit data
------------------
Branch: ni/coolstream
Commit: 4fba818cc2
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-04-11 (Fri, 11 Apr 2014)
Origin message was:
------------------
- menu: add possibility to add a footer to the menus; fix alignment of menus
add footer-keys to testmenu
(some of this code is based on code by martii; thx)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -655,6 +655,21 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
else if (actionKey == "footer_key"){
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Footer-Key pressed. Press EXIT to return");
|
||||
hintBox->paint();
|
||||
while (1)
|
||||
{
|
||||
g_RCInput->getMsg(&msg, &data, 100);
|
||||
if (msg == CRCInput::RC_home)
|
||||
break;
|
||||
}
|
||||
delete hintBox;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
return showTestMenu();
|
||||
@@ -689,6 +704,16 @@ int CTestMenu::showTestMenu()
|
||||
f_bi->setHint(NEUTRINO_ICON_HINT_IMAGEINFO, LOCALE_MENU_HINT_BUILDINFO);
|
||||
w_test.addItem(f_bi);
|
||||
|
||||
//footer buttons
|
||||
static const struct button_label footerButtons[2] = {
|
||||
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_COLORCHOOSER_RED },
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_COLORCHOOSER_GREEN }
|
||||
};
|
||||
|
||||
w_test.setFooter(footerButtons, 2);
|
||||
w_test.addKey(CRCInput::RC_red, this, "footer_key");
|
||||
w_test.addKey(CRCInput::RC_green, this, "footer_key");
|
||||
|
||||
//exit
|
||||
return w_test.exec(NULL, "");;
|
||||
}
|
||||
|
Reference in New Issue
Block a user