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

@@ -55,7 +55,7 @@ typedef struct user_menu_data_t
} user_menu_data_struct;
#define COL_BUTTONMAX SNeutrinoSettings::BUTTON_MAX
static user_menu_data_t user_menu[COL_BUTTONMAX]=
static user_menu_data_t user_menu[COL_BUTTONMAX] =
{
{LOCALE_INFOVIEWER_EVENTLIST , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED , NEUTRINO_ICON_RED, -1},
{LOCALE_INFOVIEWER_LANGUAGES , CRCInput::RC_green , NEUTRINO_ICON_BUTTON_GREEN , NEUTRINO_ICON_GREEN, -1},
@@ -63,20 +63,21 @@ static user_menu_data_t user_menu[COL_BUTTONMAX]=
{LOCALE_INFOVIEWER_STREAMINFO , CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE , NEUTRINO_ICON_FEATURES, -1}
};
// #define COL_BUTTONMAX SNeutrinoSettings::BUTTON_MAX
// const neutrino_msg_t col_key_helper_msg_def[COL_BUTTONMAX]={CRCInput::RC_red,CRCInput::RC_green,CRCInput::RC_yellow,CRCInput::RC_blue};
// const char * col_key_helper_icon_def[COL_BUTTONMAX]={NEUTRINO_ICON_BUTTON_RED,NEUTRINO_ICON_BUTTON_GREEN,NEUTRINO_ICON_BUTTON_YELLOW,NEUTRINO_ICON_BUTTON_BLUE};
class CUserMenu : public CChangeObserver
class CUserMenu : public CChangeObserver, CMenuTarget
{
private:
int width;
bool changeNotify(const neutrino_locale_t OptionName, void *);
int exec(CMenuTarget* parent, const std::string & actionKey);
public:
CUserMenu();
~CUserMenu();
bool showUserMenu(int button);
bool showUserMenu(neutrino_msg_t msg);
static const char *getUserMenuButtonName(int button, bool &active);
};