Added toggle for left/right changing system.

Analog controller users everywhere rejoice!
This commit is contained in:
Aloshi 2014-05-14 21:31:26 -05:00
parent 4f33a3a963
commit 0743828b77
4 changed files with 24 additions and 7 deletions

View file

@ -35,6 +35,7 @@ void Settings::setDefaults()
mBoolMap["ScrapeRatings"] = true;
mBoolMap["IgnoreGamelist"] = false;
mBoolMap["ParseGamelistOnly"] = false;
mBoolMap["QuickSystemSelect"] = true;
mBoolMap["Debug"] = false;
mBoolMap["DebugGrid"] = false;

View file

@ -111,6 +111,12 @@ GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MEN
s->addWithLabel("ON-SCREEN HELP", show_help);
s->addSaveFunc([show_help] { Settings::getInstance()->setBool("ShowHelpPrompts", show_help->getState()); });
// quick system select (left/right in game list view)
auto quick_sys_select = std::make_shared<SwitchComponent>(mWindow);
quick_sys_select->setState(Settings::getInstance()->getBool("QuickSystemSelect"));
s->addWithLabel("QUICK SYSTEM SELECT", quick_sys_select);
s->addSaveFunc([quick_sys_select] { Settings::getInstance()->setBool("QuickSystemSelect", quick_sys_select->getState()); });
// transition style
auto transition_style = std::make_shared< OptionListComponent<std::string> >(mWindow, "TRANSITION STYLE", false);
std::vector<std::string> transitions;

View file

@ -4,6 +4,7 @@
#include "../../Window.h"
#include "../../ThemeData.h"
#include "../../SystemData.h"
#include "../../Settings.h"
BasicGameListView::BasicGameListView(Window* window, FileData* root)
: ISimpleGameListView(window, root), mList(window)
@ -68,6 +69,8 @@ void BasicGameListView::launch(FileData* game)
std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
{
std::vector<HelpPrompt> prompts;
if(Settings::getInstance()->getBool("QuickSystemSelect"))
prompts.push_back(HelpPrompt("left/right", "system"));
prompts.push_back(HelpPrompt("up/down", "choose"));
prompts.push_back(HelpPrompt("a", "launch"));

View file

@ -3,6 +3,7 @@
#include "../../Window.h"
#include "../ViewController.h"
#include "../../Sound.h"
#include "../../Settings.h"
ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGameListView(window, root),
mHeaderText(window), mHeaderImage(window), mBackground(window), mThemeExtras(window)
@ -86,17 +87,23 @@ bool ISimpleGameListView::input(InputConfig* config, Input input)
return true;
}else if(config->isMappedTo("right", input))
{
if(Settings::getInstance()->getBool("QuickSystemSelect"))
{
onFocusLost();
mWindow->getViewController()->goToNextGameList();
return true;
}
}else if(config->isMappedTo("left", input))
{
if(Settings::getInstance()->getBool("QuickSystemSelect"))
{
onFocusLost();
mWindow->getViewController()->goToPrevGameList();
return true;
}
}
}
return IGameListView::input(config, input);
}