mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 16:15:39 +00:00
Added toggle for left/right changing system.
Analog controller users everywhere rejoice!
This commit is contained in:
parent
4f33a3a963
commit
0743828b77
|
@ -35,6 +35,7 @@ void Settings::setDefaults()
|
||||||
mBoolMap["ScrapeRatings"] = true;
|
mBoolMap["ScrapeRatings"] = true;
|
||||||
mBoolMap["IgnoreGamelist"] = false;
|
mBoolMap["IgnoreGamelist"] = false;
|
||||||
mBoolMap["ParseGamelistOnly"] = false;
|
mBoolMap["ParseGamelistOnly"] = false;
|
||||||
|
mBoolMap["QuickSystemSelect"] = true;
|
||||||
|
|
||||||
mBoolMap["Debug"] = false;
|
mBoolMap["Debug"] = false;
|
||||||
mBoolMap["DebugGrid"] = false;
|
mBoolMap["DebugGrid"] = false;
|
||||||
|
|
|
@ -111,6 +111,12 @@ GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MEN
|
||||||
s->addWithLabel("ON-SCREEN HELP", show_help);
|
s->addWithLabel("ON-SCREEN HELP", show_help);
|
||||||
s->addSaveFunc([show_help] { Settings::getInstance()->setBool("ShowHelpPrompts", show_help->getState()); });
|
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
|
// transition style
|
||||||
auto transition_style = std::make_shared< OptionListComponent<std::string> >(mWindow, "TRANSITION STYLE", false);
|
auto transition_style = std::make_shared< OptionListComponent<std::string> >(mWindow, "TRANSITION STYLE", false);
|
||||||
std::vector<std::string> transitions;
|
std::vector<std::string> transitions;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "../../Window.h"
|
#include "../../Window.h"
|
||||||
#include "../../ThemeData.h"
|
#include "../../ThemeData.h"
|
||||||
#include "../../SystemData.h"
|
#include "../../SystemData.h"
|
||||||
|
#include "../../Settings.h"
|
||||||
|
|
||||||
BasicGameListView::BasicGameListView(Window* window, FileData* root)
|
BasicGameListView::BasicGameListView(Window* window, FileData* root)
|
||||||
: ISimpleGameListView(window, root), mList(window)
|
: ISimpleGameListView(window, root), mList(window)
|
||||||
|
@ -68,7 +69,9 @@ void BasicGameListView::launch(FileData* game)
|
||||||
std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
|
std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
|
||||||
{
|
{
|
||||||
std::vector<HelpPrompt> prompts;
|
std::vector<HelpPrompt> prompts;
|
||||||
prompts.push_back(HelpPrompt("left/right", "system"));
|
|
||||||
|
if(Settings::getInstance()->getBool("QuickSystemSelect"))
|
||||||
|
prompts.push_back(HelpPrompt("left/right", "system"));
|
||||||
prompts.push_back(HelpPrompt("up/down", "choose"));
|
prompts.push_back(HelpPrompt("up/down", "choose"));
|
||||||
prompts.push_back(HelpPrompt("a", "launch"));
|
prompts.push_back(HelpPrompt("a", "launch"));
|
||||||
prompts.push_back(HelpPrompt("b", "back"));
|
prompts.push_back(HelpPrompt("b", "back"));
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "../../Window.h"
|
#include "../../Window.h"
|
||||||
#include "../ViewController.h"
|
#include "../ViewController.h"
|
||||||
#include "../../Sound.h"
|
#include "../../Sound.h"
|
||||||
|
#include "../../Settings.h"
|
||||||
|
|
||||||
ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGameListView(window, root),
|
ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGameListView(window, root),
|
||||||
mHeaderText(window), mHeaderImage(window), mBackground(window), mThemeExtras(window)
|
mHeaderText(window), mHeaderImage(window), mBackground(window), mThemeExtras(window)
|
||||||
|
@ -87,14 +88,20 @@ bool ISimpleGameListView::input(InputConfig* config, Input input)
|
||||||
return true;
|
return true;
|
||||||
}else if(config->isMappedTo("right", input))
|
}else if(config->isMappedTo("right", input))
|
||||||
{
|
{
|
||||||
onFocusLost();
|
if(Settings::getInstance()->getBool("QuickSystemSelect"))
|
||||||
mWindow->getViewController()->goToNextGameList();
|
{
|
||||||
return true;
|
onFocusLost();
|
||||||
|
mWindow->getViewController()->goToNextGameList();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}else if(config->isMappedTo("left", input))
|
}else if(config->isMappedTo("left", input))
|
||||||
{
|
{
|
||||||
onFocusLost();
|
if(Settings::getInstance()->getBool("QuickSystemSelect"))
|
||||||
mWindow->getViewController()->goToPrevGameList();
|
{
|
||||||
return true;
|
onFocusLost();
|
||||||
|
mWindow->getViewController()->goToPrevGameList();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue