2020-05-24 08:29:29 +00:00
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
// GuiGamelistOptions.h
|
2020-05-24 08:29:29 +00:00
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
// Gamelist options menu for the 'Jump to...' quick selector,
|
|
|
|
// game sorting, game filters, and metadata edit.
|
2020-05-24 08:29:29 +00:00
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
// The filter interface is covered by GuiGamelistFilter and the
|
|
|
|
// metadata edit interface is covered by GuiMetaDataEd.
|
2020-05-26 16:34:33 +00:00
|
|
|
//
|
2020-05-24 08:29:29 +00:00
|
|
|
|
2017-10-31 17:12:50 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef ES_APP_GUIS_GUI_GAME_LIST_OPTIONS_H
|
|
|
|
#define ES_APP_GUIS_GUI_GAME_LIST_OPTIONS_H
|
|
|
|
|
2014-06-25 16:29:58 +00:00
|
|
|
#include "components/MenuComponent.h"
|
|
|
|
#include "components/OptionListComponent.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
#include "FileData.h"
|
|
|
|
#include "GuiComponent.h"
|
2020-05-17 17:30:29 +00:00
|
|
|
#include "utils/StringUtil.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
class IGameListView;
|
2017-11-01 22:21:10 +00:00
|
|
|
class SystemData;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
class GuiGamelistOptions : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
2020-06-21 12:25:28 +00:00
|
|
|
GuiGamelistOptions(Window* window, SystemData* system);
|
|
|
|
virtual ~GuiGamelistOptions();
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual bool input(InputConfig* config, Input input) override;
|
|
|
|
virtual std::vector<HelpPrompt> getHelpPrompts() override;
|
|
|
|
virtual HelpStyle getHelpStyle() override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
private:
|
2020-06-21 12:25:28 +00:00
|
|
|
void openGamelistFilter();
|
|
|
|
void openMetaDataEd();
|
|
|
|
void startEditMode();
|
|
|
|
void exitEditMode();
|
|
|
|
|
|
|
|
void jumpToLetter();
|
|
|
|
void jumpToFirstRow();
|
|
|
|
|
|
|
|
MenuComponent mMenu;
|
|
|
|
|
|
|
|
typedef OptionListComponent<std::string> LetterList;
|
|
|
|
std::shared_ptr<LetterList> mJumpToLetterList;
|
|
|
|
|
|
|
|
typedef OptionListComponent<const FileData::SortType*> SortList;
|
|
|
|
std::shared_ptr<SortList> mListSort;
|
|
|
|
|
|
|
|
SystemData* mSystem;
|
|
|
|
IGameListView* getGamelist();
|
|
|
|
bool mFavoritesSorting;
|
|
|
|
bool fromPlaceholder;
|
|
|
|
bool mFiltersChanged;
|
|
|
|
bool mCancelled;
|
|
|
|
std::vector<std::string> mFirstLetterIndex;
|
|
|
|
std::string mCurrentFirstCharacter;
|
|
|
|
const std::string FAVORITE_CHAR = "\uF005";
|
2020-06-11 19:08:48 +00:00
|
|
|
|
2014-06-25 16:29:58 +00:00
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_APP_GUIS_GUI_GAME_LIST_OPTIONS_H
|