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)
|
||||
{
|
||||
mState.viewing = NOTHING;
|
||||
mState.viewstyle = AUTOMATIC;
|
||||
}
|
||||
|
||||
ViewController::~ViewController()
|
||||
|
@ -567,7 +568,7 @@ std::shared_ptr<IGameListView> ViewController::getGameListView(SystemData* syste
|
|||
bool themeHasVideoView = system->getTheme()->hasView("video");
|
||||
|
||||
// Decide which view style to use.
|
||||
GameListViewType selectedViewStyle = AUTOMATIC;
|
||||
GameListViewStyle selectedViewStyle = AUTOMATIC;
|
||||
|
||||
std::string viewPreference = Settings::getInstance()->getString("GamelistViewStyle");
|
||||
if (viewPreference.compare("basic") == 0)
|
||||
|
@ -599,19 +600,23 @@ std::shared_ptr<IGameListView> ViewController::getGameListView(SystemData* syste
|
|||
case VIDEO:
|
||||
view = std::shared_ptr<IGameListView>(
|
||||
new VideoGameListView(mWindow, system->getRootFolder()));
|
||||
mState.viewstyle = VIDEO;
|
||||
break;
|
||||
case DETAILED:
|
||||
view = std::shared_ptr<IGameListView>(
|
||||
new DetailedGameListView(mWindow, system->getRootFolder()));
|
||||
mState.viewstyle = DETAILED;
|
||||
break;
|
||||
case GRID:
|
||||
view = std::shared_ptr<IGameListView>(
|
||||
new GridGameListView(mWindow, system->getRootFolder()));
|
||||
mState.viewstyle = GRID;
|
||||
break;
|
||||
case BASIC:
|
||||
default:
|
||||
view = std::shared_ptr<IGameListView>(
|
||||
new BasicGameListView(mWindow, system->getRootFolder()));
|
||||
mState.viewstyle = BASIC;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
GAME_LIST
|
||||
};
|
||||
|
||||
enum GameListViewType {
|
||||
enum GameListViewStyle {
|
||||
AUTOMATIC,
|
||||
BASIC,
|
||||
DETAILED,
|
||||
|
@ -84,6 +84,7 @@ public:
|
|||
|
||||
struct State {
|
||||
ViewMode viewing;
|
||||
GameListViewStyle viewstyle;
|
||||
|
||||
inline SystemData* getSystem() const
|
||||
{
|
||||
|
|
|
@ -269,14 +269,17 @@ std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
|
|||
|
||||
if (mRoot->getSystem()->getThemeFolder() == "custom-collections" &&
|
||||
!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"));
|
||||
}
|
||||
else if (mRoot->getSystem()->isGameSystem() &&
|
||||
!UIModeController::getInstance()->isUIModeKid() &&
|
||||
!UIModeController::getInstance()->isUIModeKiosk() &&
|
||||
(Settings::getInstance()->getBool("FavoritesAddButton") ||
|
||||
CollectionSystemsManager::get()->isEditing())) {
|
||||
(mRoot->getSystem()->getThemeFolder() != "custom-collections" ||
|
||||
!mCursorStack.empty()) &&
|
||||
!UIModeController::getInstance()->isUIModeKid() &&
|
||||
!UIModeController::getInstance()->isUIModeKiosk() &&
|
||||
(Settings::getInstance()->getBool("FavoritesAddButton") ||
|
||||
CollectionSystemsManager::get()->isEditing())) {
|
||||
std::string prompt = CollectionSystemsManager::get()->getEditingCollection();
|
||||
prompts.push_back(HelpPrompt("y", prompt));
|
||||
}
|
||||
|
|
|
@ -638,7 +638,9 @@ std::vector<HelpPrompt> GridGameListView::getHelpPrompts()
|
|||
prompts.push_back(HelpPrompt("select", "options"));
|
||||
if (mRoot->getSystem()->isGameSystem())
|
||||
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();
|
||||
prompts.push_back(HelpPrompt("y", prompt));
|
||||
}
|
||||
|
|
|
@ -20,13 +20,11 @@ class Window;
|
|||
class IGameListView : public GuiComponent
|
||||
{
|
||||
public:
|
||||
IGameListView(
|
||||
Window* window,
|
||||
FileData* root)
|
||||
: GuiComponent(window),
|
||||
mRoot(root)
|
||||
{ setSize(static_cast<float>(Renderer::getScreenWidth()),
|
||||
static_cast<float>(Renderer::getScreenHeight())); }
|
||||
IGameListView(Window* window, FileData* root) : GuiComponent(window), mRoot(root)
|
||||
{
|
||||
setSize(static_cast<float>(Renderer::getScreenWidth()),
|
||||
static_cast<float>(Renderer::getScreenHeight()));
|
||||
}
|
||||
|
||||
virtual ~IGameListView() {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue