mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Removed the remaining video player code from GridGameListView.
This commit is contained in:
parent
9779ca8bd5
commit
4d9ea680b0
|
@ -15,10 +15,6 @@
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "Sound.h"
|
#include "Sound.h"
|
||||||
#include "SystemData.h"
|
#include "SystemData.h"
|
||||||
#if defined(_RPI_)
|
|
||||||
#include "components/VideoOmxComponent.h"
|
|
||||||
#endif
|
|
||||||
#include "components/VideoVlcComponent.h"
|
|
||||||
|
|
||||||
GridGameListView::GridGameListView(
|
GridGameListView::GridGameListView(
|
||||||
Window* window,
|
Window* window,
|
||||||
|
@ -28,8 +24,6 @@ GridGameListView::GridGameListView(
|
||||||
mGrid(window),
|
mGrid(window),
|
||||||
mMarquee(window),
|
mMarquee(window),
|
||||||
mImage(window),
|
mImage(window),
|
||||||
mVideo(nullptr),
|
|
||||||
mVideoPlaying(false),
|
|
||||||
|
|
||||||
mDescContainer(window),
|
mDescContainer(window),
|
||||||
mDescription(window),
|
mDescription(window),
|
||||||
|
@ -56,16 +50,6 @@ GridGameListView::GridGameListView(
|
||||||
{
|
{
|
||||||
const float padding = 0.01f;
|
const float padding = 0.01f;
|
||||||
|
|
||||||
// Create the correct type of video window.
|
|
||||||
#if defined(_RPI_)
|
|
||||||
if (Settings::getInstance()->getBool("VideoOmxPlayer"))
|
|
||||||
mVideo = new VideoOmxComponent(window);
|
|
||||||
else
|
|
||||||
mVideo = new VideoVlcComponent(window);
|
|
||||||
#else
|
|
||||||
mVideo = new VideoVlcComponent(window);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mGrid.setPosition(mSize.x() * 0.1f, mSize.y() * 0.1f);
|
mGrid.setPosition(mSize.x() * 0.1f, mSize.y() * 0.1f);
|
||||||
mGrid.setDefaultZIndex(20);
|
mGrid.setDefaultZIndex(20);
|
||||||
mGrid.setCursorChangedCallback([&](const CursorState& /*state*/) { updateInfoPanel(); });
|
mGrid.setCursorChangedCallback([&](const CursorState& /*state*/) { updateInfoPanel(); });
|
||||||
|
@ -132,13 +116,6 @@ GridGameListView::GridGameListView(
|
||||||
mImage.setVisible(false);
|
mImage.setVisible(false);
|
||||||
addChild(&mImage);
|
addChild(&mImage);
|
||||||
|
|
||||||
mVideo->setOrigin(0.5f, 0.5f);
|
|
||||||
mVideo->setPosition(mSize.x() * 0.25f, mSize.y() * 0.4f);
|
|
||||||
mVideo->setSize(mSize.x() * (0.5f - 2 * padding), mSize.y() * 0.4f);
|
|
||||||
mVideo->setDefaultZIndex(15);
|
|
||||||
mVideo->setVisible(false);
|
|
||||||
addChild(mVideo);
|
|
||||||
|
|
||||||
mGamelistInfo.setOrigin(0.5f, 0.5f);
|
mGamelistInfo.setOrigin(0.5f, 0.5f);
|
||||||
mGamelistInfo.setFont(Font::get(FONT_SIZE_SMALL));
|
mGamelistInfo.setFont(Font::get(FONT_SIZE_SMALL));
|
||||||
mGamelistInfo.setDefaultZIndex(50);
|
mGamelistInfo.setDefaultZIndex(50);
|
||||||
|
@ -152,7 +129,6 @@ GridGameListView::GridGameListView(
|
||||||
|
|
||||||
GridGameListView::~GridGameListView()
|
GridGameListView::~GridGameListView()
|
||||||
{
|
{
|
||||||
delete mVideo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridGameListView::onFileChanged(FileData* file, bool reloadGameList)
|
void GridGameListView::onFileChanged(FileData* file, bool reloadGameList)
|
||||||
|
@ -304,8 +280,6 @@ void GridGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
||||||
POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION | VISIBLE);
|
POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION | VISIBLE);
|
||||||
mImage.applyTheme(theme, getName(), "md_image",
|
mImage.applyTheme(theme, getName(), "md_image",
|
||||||
POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION | VISIBLE);
|
POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION | VISIBLE);
|
||||||
mVideo->applyTheme(theme, getName(), "md_video",
|
|
||||||
POSITION | ThemeFlags::SIZE | ThemeFlags::DELAY | Z_INDEX | ROTATION | VISIBLE);
|
|
||||||
|
|
||||||
initMDLabels();
|
initMDLabels();
|
||||||
std::vector<TextComponent*> labels = getMDLabels();
|
std::vector<TextComponent*> labels = getMDLabels();
|
||||||
|
@ -463,10 +437,6 @@ void GridGameListView::updateInfoPanel()
|
||||||
|
|
||||||
bool fadingOut;
|
bool fadingOut;
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
mVideo->setVideo("");
|
|
||||||
mVideo->setImage("");
|
|
||||||
mVideoPlaying = false;
|
|
||||||
|
|
||||||
fadingOut = true;
|
fadingOut = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -534,7 +504,6 @@ void GridGameListView::updateInfoPanel()
|
||||||
comps.push_back(&mDescription);
|
comps.push_back(&mDescription);
|
||||||
comps.push_back(&mName);
|
comps.push_back(&mName);
|
||||||
comps.push_back(&mMarquee);
|
comps.push_back(&mMarquee);
|
||||||
comps.push_back(mVideo);
|
|
||||||
comps.push_back(&mImage);
|
comps.push_back(&mImage);
|
||||||
std::vector<TextComponent*> labels = getMDLabels();
|
std::vector<TextComponent*> labels = getMDLabels();
|
||||||
comps.insert(comps.cend(), labels.cbegin(), labels.cend());
|
comps.insert(comps.cend(), labels.cbegin(), labels.cend());
|
||||||
|
@ -732,7 +701,6 @@ std::vector<HelpPrompt> GridGameListView::getHelpPrompts()
|
||||||
void GridGameListView::update(int deltaTime)
|
void GridGameListView::update(int deltaTime)
|
||||||
{
|
{
|
||||||
ISimpleGameListView::update(deltaTime);
|
ISimpleGameListView::update(deltaTime);
|
||||||
mVideo->update(deltaTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridGameListView::onShow()
|
void GridGameListView::onShow()
|
||||||
|
|
|
@ -84,8 +84,6 @@ private:
|
||||||
TextComponent mLblPlayCount;
|
TextComponent mLblPlayCount;
|
||||||
|
|
||||||
ImageComponent mMarquee;
|
ImageComponent mMarquee;
|
||||||
VideoComponent* mVideo;
|
|
||||||
bool mVideoPlaying;
|
|
||||||
ImageComponent mImage;
|
ImageComponent mImage;
|
||||||
RatingComponent mRating;
|
RatingComponent mRating;
|
||||||
DateTimeComponent mReleaseDate;
|
DateTimeComponent mReleaseDate;
|
||||||
|
|
Loading…
Reference in a new issue