- plugins: type for listed plugins on blue key is selectable

* add mainmenu items for tools and lua-extensions
  (default not visible)
* add usermenu items for tools and lua-extensions
  (default off)
This commit is contained in:
svenhoefer
2014-02-04 09:08:21 +01:00
parent 31221edc47
commit f9ad30f183
13 changed files with 85 additions and 11 deletions

View File

@@ -195,11 +195,25 @@ void CNeutrinoApp::InitMenuMain()
mf->setHint(NEUTRINO_ICON_HINT_GAMES, LOCALE_MENU_HINT_GAMES);
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]);
//tools
bool show_tools = g_PluginList->hasPlugin(CPlugins::P_TYPE_TOOL);
mf = new CMenuForwarder(LOCALE_MAINMENU_TOOLS, show_tools, NULL, new CPluginList(LOCALE_MAINMENU_TOOLS,CPlugins::P_TYPE_TOOL));
mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_TOOLS);
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TOOLS]);
//scripts
bool show_scripts = g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT);
mf = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, show_scripts, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT));
mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS);
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]);
#if ENABLE_LUA
//lua
bool show_lua = g_PluginList->hasPlugin(CPlugins::P_TYPE_LUA);
mf = new CMenuForwarder(LOCALE_MAINMENU_LUA, show_lua, NULL, new CPluginList(LOCALE_MAINMENU_LUA,CPlugins::P_TYPE_LUA));
mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_LUA);
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_LUA]);
#endif
}
//separator