mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Changed to full system name sorting for the system view and scraper selector.
This commit is contained in:
parent
77076c22f4
commit
feb6577dbc
|
@ -63,6 +63,8 @@ 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] {
|
||||
|
|
|
@ -146,6 +146,10 @@ 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)
|
||||
|
|
|
@ -100,7 +100,8 @@ void ViewController::goToStart()
|
|||
// Requested system doesn't exist.
|
||||
Settings::getInstance()->setString("StartupSystem", "");
|
||||
}
|
||||
goToSystemView(SystemData::sSystemVector.at(0));
|
||||
// Get the first system entry as sorted by full system names in SystemView.
|
||||
goToSystemView(getSystemListView()->getFirst());
|
||||
}
|
||||
|
||||
void ViewController::ReloadAndGoToStart()
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#include "Log.h"
|
||||
#include "Window.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// Used to display a list of options.
|
||||
// Can select one or multiple options.
|
||||
|
||||
|
@ -199,6 +201,12 @@ public:
|
|||
onSelectedChanged();
|
||||
}
|
||||
|
||||
void sortEntriesByName()
|
||||
{
|
||||
std::sort(std::begin(mEntries), std::end(mEntries),
|
||||
[](OptionListData a, OptionListData b) { return a.name < b.name; });
|
||||
}
|
||||
|
||||
HelpStyle getHelpStyle() override { return mHelpStyle; };
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue