Move menu open code to ViewController so you can open it in the system

select
This commit is contained in:
Aloshi 2013-12-20 15:47:21 -06:00
parent bce46cb925
commit 4b6f8d9007
2 changed files with 10 additions and 6 deletions

View file

@ -23,12 +23,6 @@ bool GameListView::input(InputConfig* config, Input input)
}));
mTheme->playSound("menuOpenSound");
return true;
}else if(config->isMappedTo("menu", input) && input.value != 0)
{
// open menu
mWindow->pushGui(new GuiMenu(mWindow));
mTheme->playSound("menuOpenSound");
return true;
}else if(config->isMappedTo("select", input) && input.value != 0)
{
// open fast select

View file

@ -5,6 +5,7 @@
#include "BasicGameListView.h"
#include "DetailedGameListView.h"
#include "GridGameListView.h"
#include "../components/GuiMenu.h"
#include "../animations/LaunchAnimation.h"
#include "../animations/MoveCameraAnimation.h"
#include "../animations/LambdaAnimation.h"
@ -176,6 +177,15 @@ bool ViewController::input(InputConfig* config, Input input)
if(mLockInput)
return true;
// open menu
if(config->isMappedTo("menu", input) && input.value != 0)
{
// open menu
mWindow->pushGui(new GuiMenu(mWindow));
ThemeData().playSound("menuOpenSound");
return true;
}
if(mCurrentView)
return mCurrentView->input(config, input);