ES-DE/es-app/src/MediaViewer.h

56 lines
1.1 KiB
C
Raw Normal View History

2021-05-16 11:12:31 +00:00
// SPDX-License-Identifier: MIT
//
// EmulationStation Desktop Edition
// MediaViewer.h
//
// Fullscreen game media viewer.
//
#ifndef ES_APP_MEDIA_VIEWER_H
#define ES_APP_MEDIA_VIEWER_H
#include "FileData.h"
#include "Window.h"
#include "components/ImageComponent.h"
#include "components/VideoComponent.h"
2021-05-16 11:12:31 +00:00
class MediaViewer : public Window::MediaViewer
{
public:
MediaViewer();
2021-05-16 11:12:31 +00:00
bool startMediaViewer(FileData* game) override;
void stopMediaViewer() override;
2021-05-16 11:12:31 +00:00
void update(int deltaTime) override;
void render(const glm::mat4& parentTrans) override;
2021-05-16 11:12:31 +00:00
private:
void initiateViewer();
void findMedia();
void loadImages();
2021-05-16 11:12:31 +00:00
void playVideo();
void showNext() override;
void showPrevious() override;
2021-05-16 11:12:31 +00:00
Renderer* mRenderer;
2021-05-16 11:12:31 +00:00
FileData* mGame;
bool mHasVideo;
bool mHasImages;
bool mDisplayingImage;
int mCurrentImageIndex;
int mScreenshotIndex;
int mTitleScreenIndex;
2021-05-16 11:12:31 +00:00
std::string mVideoFile;
std::unique_ptr<VideoComponent> mVideo;
2021-05-16 11:12:31 +00:00
std::vector<std::string> mImageFiles;
std::vector<std::unique_ptr<ImageComponent>> mImages;
2021-05-16 11:12:31 +00:00
};
#endif // ES_APP_MEDIA_VIEWER_H