2020-05-24 08:29:29 +00:00
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
// GridGameListView.h
|
2020-05-24 08:29:29 +00:00
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
// Interface that defines a GameListView of the type 'grid'.
|
2020-05-24 08:29:29 +00:00
|
|
|
//
|
|
|
|
|
2014-06-25 16:29:58 +00:00
|
|
|
#pragma once
|
2017-10-31 17:12:50 +00:00
|
|
|
#ifndef ES_APP_VIEWS_GAME_LIST_GRID_GAME_LIST_VIEW_H
|
|
|
|
#define ES_APP_VIEWS_GAME_LIST_GRID_GAME_LIST_VIEW_H
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2018-03-22 12:52:13 +00:00
|
|
|
#include "components/DateTimeComponent.h"
|
|
|
|
#include "components/RatingComponent.h"
|
|
|
|
#include "components/ScrollableContainer.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
#include "components/ImageGridComponent.h"
|
2019-12-30 19:35:34 +00:00
|
|
|
#include "components/VideoComponent.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
#include "views/gamelist/ISimpleGameListView.h"
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
class GridGameListView : public ISimpleGameListView
|
|
|
|
{
|
|
|
|
public:
|
2020-06-21 12:25:28 +00:00
|
|
|
GridGameListView(Window* window, FileData* root);
|
|
|
|
virtual ~GridGameListView();
|
2020-02-29 02:19:52 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual void onShow() override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual FileData* getCursor() override;
|
|
|
|
virtual void setCursor(FileData*) override;
|
|
|
|
virtual FileData* getFirstEntry() override;
|
|
|
|
virtual FileData* getLastEntry() override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual bool input(InputConfig* config, Input input) override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual const char* getName() const override { return "grid"; }
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual std::vector<HelpPrompt> getHelpPrompts() override;
|
|
|
|
virtual void launch(FileData* game) override;
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
protected:
|
2020-06-21 12:25:28 +00:00
|
|
|
virtual void update(int deltaTime) override;
|
|
|
|
virtual std::string getQuickSystemSelectRightButton() override;
|
|
|
|
virtual std::string getQuickSystemSelectLeftButton() override;
|
|
|
|
virtual void populateList(const std::vector<FileData*>& files) override;
|
|
|
|
virtual void remove(FileData* game, bool deleteFile) override;
|
|
|
|
virtual void addPlaceholder();
|
2014-06-25 16:29:58 +00:00
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
ImageGridComponent<FileData*> mGrid;
|
2018-03-22 12:52:13 +00:00
|
|
|
|
|
|
|
private:
|
2020-06-21 12:25:28 +00:00
|
|
|
void updateInfoPanel();
|
|
|
|
const std::string getImagePath(FileData* file);
|
|
|
|
|
|
|
|
void initMDLabels();
|
|
|
|
void initMDValues();
|
|
|
|
|
|
|
|
TextComponent mLblRating;
|
|
|
|
TextComponent mLblReleaseDate;
|
|
|
|
TextComponent mLblDeveloper;
|
|
|
|
TextComponent mLblPublisher;
|
|
|
|
TextComponent mLblGenre;
|
|
|
|
TextComponent mLblPlayers;
|
|
|
|
TextComponent mLblLastPlayed;
|
|
|
|
TextComponent mLblPlayCount;
|
|
|
|
|
|
|
|
ImageComponent mMarquee;
|
|
|
|
VideoComponent* mVideo;
|
|
|
|
bool mVideoPlaying;
|
|
|
|
ImageComponent mImage;
|
|
|
|
RatingComponent mRating;
|
|
|
|
DateTimeComponent mReleaseDate;
|
|
|
|
TextComponent mDeveloper;
|
|
|
|
TextComponent mPublisher;
|
|
|
|
TextComponent mGenre;
|
|
|
|
TextComponent mPlayers;
|
|
|
|
DateTimeComponent mLastPlayed;
|
|
|
|
TextComponent mPlayCount;
|
|
|
|
TextComponent mName;
|
|
|
|
|
|
|
|
std::vector<TextComponent*> getMDLabels();
|
|
|
|
std::vector<GuiComponent*> getMDValues();
|
|
|
|
|
|
|
|
ScrollableContainer mDescContainer;
|
|
|
|
TextComponent mDescription;
|
2014-06-25 16:29:58 +00:00
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_APP_VIEWS_GAME_LIST_GRID_GAME_LIST_VIEW_H
|