mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 23:15:38 +00:00
Fixed some issues with the 'Jump to Game' help prompts.
This commit is contained in:
parent
559cabbc6b
commit
b987abed8b
|
@ -75,6 +75,7 @@ ViewController::ViewController(
|
||||||
mGameToLaunch(nullptr)
|
mGameToLaunch(nullptr)
|
||||||
{
|
{
|
||||||
mState.viewing = NOTHING;
|
mState.viewing = NOTHING;
|
||||||
|
mState.viewstyle = AUTOMATIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewController::~ViewController()
|
ViewController::~ViewController()
|
||||||
|
@ -567,7 +568,7 @@ std::shared_ptr<IGameListView> ViewController::getGameListView(SystemData* syste
|
||||||
bool themeHasVideoView = system->getTheme()->hasView("video");
|
bool themeHasVideoView = system->getTheme()->hasView("video");
|
||||||
|
|
||||||
// Decide which view style to use.
|
// Decide which view style to use.
|
||||||
GameListViewType selectedViewStyle = AUTOMATIC;
|
GameListViewStyle selectedViewStyle = AUTOMATIC;
|
||||||
|
|
||||||
std::string viewPreference = Settings::getInstance()->getString("GamelistViewStyle");
|
std::string viewPreference = Settings::getInstance()->getString("GamelistViewStyle");
|
||||||
if (viewPreference.compare("basic") == 0)
|
if (viewPreference.compare("basic") == 0)
|
||||||
|
@ -599,19 +600,23 @@ std::shared_ptr<IGameListView> ViewController::getGameListView(SystemData* syste
|
||||||
case VIDEO:
|
case VIDEO:
|
||||||
view = std::shared_ptr<IGameListView>(
|
view = std::shared_ptr<IGameListView>(
|
||||||
new VideoGameListView(mWindow, system->getRootFolder()));
|
new VideoGameListView(mWindow, system->getRootFolder()));
|
||||||
|
mState.viewstyle = VIDEO;
|
||||||
break;
|
break;
|
||||||
case DETAILED:
|
case DETAILED:
|
||||||
view = std::shared_ptr<IGameListView>(
|
view = std::shared_ptr<IGameListView>(
|
||||||
new DetailedGameListView(mWindow, system->getRootFolder()));
|
new DetailedGameListView(mWindow, system->getRootFolder()));
|
||||||
|
mState.viewstyle = DETAILED;
|
||||||
break;
|
break;
|
||||||
case GRID:
|
case GRID:
|
||||||
view = std::shared_ptr<IGameListView>(
|
view = std::shared_ptr<IGameListView>(
|
||||||
new GridGameListView(mWindow, system->getRootFolder()));
|
new GridGameListView(mWindow, system->getRootFolder()));
|
||||||
|
mState.viewstyle = GRID;
|
||||||
break;
|
break;
|
||||||
case BASIC:
|
case BASIC:
|
||||||
default:
|
default:
|
||||||
view = std::shared_ptr<IGameListView>(
|
view = std::shared_ptr<IGameListView>(
|
||||||
new BasicGameListView(mWindow, system->getRootFolder()));
|
new BasicGameListView(mWindow, system->getRootFolder()));
|
||||||
|
mState.viewstyle = BASIC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
GAME_LIST
|
GAME_LIST
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GameListViewType {
|
enum GameListViewStyle {
|
||||||
AUTOMATIC,
|
AUTOMATIC,
|
||||||
BASIC,
|
BASIC,
|
||||||
DETAILED,
|
DETAILED,
|
||||||
|
@ -84,6 +84,7 @@ public:
|
||||||
|
|
||||||
struct State {
|
struct State {
|
||||||
ViewMode viewing;
|
ViewMode viewing;
|
||||||
|
GameListViewStyle viewstyle;
|
||||||
|
|
||||||
inline SystemData* getSystem() const
|
inline SystemData* getSystem() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -269,14 +269,17 @@ std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
|
||||||
|
|
||||||
if (mRoot->getSystem()->getThemeFolder() == "custom-collections" &&
|
if (mRoot->getSystem()->getThemeFolder() == "custom-collections" &&
|
||||||
!CollectionSystemsManager::get()->isEditing() && mCursorStack.empty() &&
|
!CollectionSystemsManager::get()->isEditing() && mCursorStack.empty() &&
|
||||||
ViewController::get()->getState().viewing == ViewController::GAME_LIST) {
|
ViewController::get()->getState().viewing == ViewController::GAME_LIST &&
|
||||||
|
ViewController::get()->getState().viewstyle != ViewController::BASIC) {
|
||||||
prompts.push_back(HelpPrompt("y", "jump to game"));
|
prompts.push_back(HelpPrompt("y", "jump to game"));
|
||||||
}
|
}
|
||||||
else if (mRoot->getSystem()->isGameSystem() &&
|
else if (mRoot->getSystem()->isGameSystem() &&
|
||||||
!UIModeController::getInstance()->isUIModeKid() &&
|
(mRoot->getSystem()->getThemeFolder() != "custom-collections" ||
|
||||||
!UIModeController::getInstance()->isUIModeKiosk() &&
|
!mCursorStack.empty()) &&
|
||||||
(Settings::getInstance()->getBool("FavoritesAddButton") ||
|
!UIModeController::getInstance()->isUIModeKid() &&
|
||||||
CollectionSystemsManager::get()->isEditing())) {
|
!UIModeController::getInstance()->isUIModeKiosk() &&
|
||||||
|
(Settings::getInstance()->getBool("FavoritesAddButton") ||
|
||||||
|
CollectionSystemsManager::get()->isEditing())) {
|
||||||
std::string prompt = CollectionSystemsManager::get()->getEditingCollection();
|
std::string prompt = CollectionSystemsManager::get()->getEditingCollection();
|
||||||
prompts.push_back(HelpPrompt("y", prompt));
|
prompts.push_back(HelpPrompt("y", prompt));
|
||||||
}
|
}
|
||||||
|
|
|
@ -638,7 +638,9 @@ std::vector<HelpPrompt> GridGameListView::getHelpPrompts()
|
||||||
prompts.push_back(HelpPrompt("select", "options"));
|
prompts.push_back(HelpPrompt("select", "options"));
|
||||||
if (mRoot->getSystem()->isGameSystem())
|
if (mRoot->getSystem()->isGameSystem())
|
||||||
prompts.push_back(HelpPrompt("x", "random"));
|
prompts.push_back(HelpPrompt("x", "random"));
|
||||||
if (mRoot->getSystem()->isGameSystem() && !UIModeController::getInstance()->isUIModeKid()) {
|
if (mRoot->getSystem()->isGameSystem() && !UIModeController::getInstance()->isUIModeKid() &&
|
||||||
|
(mRoot->getSystem()->getThemeFolder() != "custom-collections" ||
|
||||||
|
!mCursorStack.empty())) {
|
||||||
std::string prompt = CollectionSystemsManager::get()->getEditingCollection();
|
std::string prompt = CollectionSystemsManager::get()->getEditingCollection();
|
||||||
prompts.push_back(HelpPrompt("y", prompt));
|
prompts.push_back(HelpPrompt("y", prompt));
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,13 +20,11 @@ class Window;
|
||||||
class IGameListView : public GuiComponent
|
class IGameListView : public GuiComponent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IGameListView(
|
IGameListView(Window* window, FileData* root) : GuiComponent(window), mRoot(root)
|
||||||
Window* window,
|
{
|
||||||
FileData* root)
|
setSize(static_cast<float>(Renderer::getScreenWidth()),
|
||||||
: GuiComponent(window),
|
static_cast<float>(Renderer::getScreenHeight()));
|
||||||
mRoot(root)
|
}
|
||||||
{ setSize(static_cast<float>(Renderer::getScreenWidth()),
|
|
||||||
static_cast<float>(Renderer::getScreenHeight())); }
|
|
||||||
|
|
||||||
virtual ~IGameListView() {}
|
virtual ~IGameListView() {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue