moviebrowser: clean up showMenu(), parental lock menu outsourced

Origin commit data
------------------
Commit: 10a97019a3
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-06-20 (Thu, 20 Jun 2019)
This commit is contained in:
2019-06-20 21:32:01 +02:00
committed by vanhofen
parent e033f640f3
commit dad3eccbf7
2 changed files with 10 additions and 6 deletions

View File

@@ -3597,6 +3597,13 @@ void CMovieBrowser::changeBrowserHeight(CMenuForwarder* fw1, CMenuForwarder* fw2
fw2->paint();
}
void CMovieBrowser::initParentalMenu(CMenuWidget *ParentalMenu)
{
ParentalMenu->addIntroItems(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_HEAD);
ParentalMenu->addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED, (int*)(&m_parentalLock), MESSAGEBOX_PARENTAL_LOCK_OPTIONS, MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT, true));
ParentalMenu->addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_RATE_HEAD, (int*)(&m_settings.parentalLockAge), MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true));
}
bool CMovieBrowser::showMenu(bool calledExternally)
{
/* first clear screen */
@@ -3610,13 +3617,9 @@ bool CMovieBrowser::showMenu(bool calledExternally)
/********************************************************************/
/** options menu **************************************************/
/********************************************************************/
/** parental lock **************************************************/
// init parental lock menu
CMenuWidget parentalMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
parentalMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_HEAD);
parentalMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED, (int*)(&m_parentalLock), MESSAGEBOX_PARENTAL_LOCK_OPTIONS, MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT, true));
parentalMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_RATE_HEAD, (int*)(&m_settings.parentalLockAge), MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true));
initParentalMenu(&parentalMenu);
/********************************************************************/
/** optionsVerzeichnisse **************************************************/

View File

@@ -350,6 +350,7 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals
void initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* movie_info, CIntInput* BookStartIntInput, CIntInput* BookLastIntInput, CIntInput* BookEndIntInput);
void initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info);
void initUpdateMovieInfoMenu(CMenuWidget *MovieInfoMenuUpdate);
void initParentalMenu(CMenuWidget *ParentalMenu);
int showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2
int showMovieCutMenu(); // P2
int showStartPosSelectionMenu(void); // P2