From 54ea153d937c755a0498161670b9d5e08e8787f7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 27 Sep 2020 12:49:14 +0200 Subject: [PATCH] Game systems are now sorted by their full names. --- NEWS.md | 1 + USERGUIDE.md | 28 +++++++++++++++++++++++++++- es-app/src/SystemData.cpp | 6 ++++++ es-app/src/guis/GuiScraperMenu.cpp | 2 -- es-app/src/views/SystemView.cpp | 4 ---- es-app/src/views/ViewController.cpp | 2 +- 6 files changed, 35 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index bec957836..f0423e31e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -19,6 +19,7 @@ Many bugs have been fixed, and numerous features that were only partially implem * Initial version, fork from RetroPie EmulationStation 2.10.0rp-dev (master) * Reorganization and general overhaul of the menu system, hopefully making it more intuitive and easy to understand * Many quality of life improvements and removal of GUI inconsistencies +* Game systems are now sorted by full names which makes much more sense from a user perspective * New game media file logic using a media directory with files matching the ROM names instead of pointing to the media files in gamelist.xml * Updated scraper to support additional media files, detailed configuration of what to scrape, semi-automatic mode etc. * In the metadata editor, any values updated by the single-game scraper or by the user are now highlighted using a different font color diff --git a/USERGUIDE.md b/USERGUIDE.md index ae84fa681..7ba0cc083 100644 --- a/USERGUIDE.md +++ b/USERGUIDE.md @@ -827,7 +827,9 @@ This is only shown if the system is a collection. This will also be described in ## Metadata editor -In the metadata editor, you can modify the metadata for a game, scrape for game info and media files and delete media files or the entire game. +In the metadata editor, you can modify the metadata for a game, scrape for game info and media files and delete media files and gamelist entries, or the entire game. + +### Metadata entries The following entries can be modified: @@ -907,6 +909,30 @@ Here you can override the launch command for the game, for example to use a diff A statistics counter that counts how many times you're played the game. You normally don't need to touch this, but if you want to, the possibility is there. +### Buttons + +For game files, there will be four buttons displayed on the bottom of the metadata editor window, and for folders there will be three buttons. These are their functions: + +**Scrape** + +Opens the single-game scraper, which is explained earlier in this guide. + +**Save** + +Saves any changes and closes the window. If no changes have been done, it simply closes the window. + +**Cancel** + +Cancels any changes and closes the window. If no changes have been done, it simply closes the window. + +**Clear** + +This will remove any media files for the game file and also remove its entry from gamelist.xml. The actual game file will however _not_ be deleted. A prompt will be shown asking for confirmation. + +**Delete** _(Files only)_ + +This will remove the actual game file and its gamelist.xml entry, as well as any media files. A prompt will be shown asking for confirmation. Note that deletion of folders is not supported as that would potentially be a bit dangerous, instead use the valid operating system tools to handle deletion of folders. + ## Screensaver diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index c841d2882..13843be5e 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -354,6 +354,12 @@ bool SystemData::loadConfig() sSystemVector.push_back(newSys); } } + + // Sort systems by their full names. + std::sort(std::begin(sSystemVector), std::end(sSystemVector), + [](SystemData* a, SystemData* b) { + return a->getFullName() < b->getFullName(); }); + // Don't load any collections if there are no systems available. if (sSystemVector.size() > 0) CollectionSystemManager::get()->loadCollectionSystems(); diff --git a/es-app/src/guis/GuiScraperMenu.cpp b/es-app/src/guis/GuiScraperMenu.cpp index a07c291e2..c4fef6158 100644 --- a/es-app/src/guis/GuiScraperMenu.cpp +++ b/es-app/src/guis/GuiScraperMenu.cpp @@ -68,8 +68,6 @@ GuiScraperMenu::GuiScraperMenu(Window* window) : GuiComponent(window), mSystems->selectEntry(i) : mSystems->unselectEntry(i); } } - // Sort the systems by their full names. - mSystems->sortEntriesByName(); mMenu.addWithLabel("Systems", mSystems); addEntry("CONTENT SETTINGS", 0x777777FF, true, [this] { diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 0963d7a61..6fe69492a 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -149,10 +149,6 @@ void SystemView::populate() "OK", nullptr)); } } - - // Sort the systems by their full names. - std::sort(std::begin(mEntries), std::end(mEntries), - [](Entry a, Entry b) { return a.object->getFullName() < b.object->getFullName(); }); } void SystemView::goToSystem(SystemData* system, bool animate) diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index ac9adf12f..ebbecd2a0 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -101,7 +101,7 @@ void ViewController::goToStart() // Requested system doesn't exist. Settings::getInstance()->setString("StartupSystem", ""); } - // Get the first system entry as sorted by full system names in SystemView. + // Get the first system entry. goToSystemView(getSystemListView()->getFirst()); }