neutrino: sync keybind and usermenu code with neutrino-mp, code (C) martii

Origin commit data
------------------
Commit: 420af7a4dc
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-09-05 (Fri, 05 Sep 2014)
This commit is contained in:
[CST] Focus
2014-09-05 17:49:11 +04:00
parent 49a8a4e74f
commit 34d2776109
45 changed files with 1767 additions and 1144 deletions

View File

@@ -64,7 +64,7 @@ public:
CKeyChooser::CKeyChooser(int * const Key, const neutrino_locale_t title, const std::string & Icon) : CMenuWidget(title, Icon)
CKeyChooser::CKeyChooser(unsigned int * const Key, const neutrino_locale_t title, const std::string & Icon) : CMenuWidget(title, Icon)
{
frameBuffer = CFrameBuffer::getInstance();
key = Key;
@@ -76,7 +76,7 @@ CKeyChooser::CKeyChooser(int * const Key, const neutrino_locale_t title, const s
addItem(GenericMenuSeparatorLine);
addItem(GenericMenuBack);
addItem(GenericMenuSeparatorLine);
addItem(new CMenuForwarder(LOCALE_KEYCHOOSERMENU_SETNEW , true, NULL, keyChooser));
addItem(new CMenuForwarder(LOCALE_KEYCHOOSERMENU_SETNEW, true, NULL, keyChooser));
addItem(new CMenuForwarder(LOCALE_KEYCHOOSERMENU_SETNONE, true, NULL, keyDeleter));
}
@@ -96,7 +96,7 @@ void CKeyChooser::paint()
}
//*****************************
CKeyChooserItem::CKeyChooserItem(const neutrino_locale_t Name, int * Key)
CKeyChooserItem::CKeyChooserItem(const neutrino_locale_t Name, unsigned int * Key)
{
name = Name;
key = Key;
@@ -117,7 +117,7 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &)
parent->hide();
paint();
CFrameBuffer::getInstance()->blit();
g_RCInput->clearRCMsg();
g_RCInput->setLongPressAny(true);
@@ -147,6 +147,7 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &)
void CKeyChooserItem::hide()
{
CFrameBuffer::getInstance()->paintBackgroundBoxRel(x, y, width, height);
CFrameBuffer::getInstance()->blit();
}
void CKeyChooserItem::paint()