Fixed an issue where a missing texture in GridTileComponent generated a lot of log warnings.

This commit is contained in:
Leon Styhre 2021-01-05 15:57:50 +01:00
parent 42c95019be
commit dc9c49438f
3 changed files with 6 additions and 5 deletions

View file

@ -3,7 +3,7 @@
// EmulationStation Desktop Edition // EmulationStation Desktop Edition
// GridTileComponent.cpp // GridTileComponent.cpp
// //
// X*Y grid. // X*Y tile grid, used indirectly by GridGameListView via ImageGridComponent.
// //
#include "GridTileComponent.h" #include "GridTileComponent.h"
@ -12,13 +12,14 @@
#include "resources/TextureResource.h" #include "resources/TextureResource.h"
#include "ThemeData.h" #include "ThemeData.h"
GridTileComponent::GridTileComponent(Window* window) : GuiComponent(window), mBackground(window) GridTileComponent::GridTileComponent(Window* window) :
GuiComponent(window), mBackground(window, ":/graphics/frame.png")
{ {
mDefaultProperties.mSize = getDefaultTileSize(); mDefaultProperties.mSize = getDefaultTileSize();
mDefaultProperties.mPadding = Vector2f(16.0f, 16.0f); mDefaultProperties.mPadding = Vector2f(16.0f, 16.0f);
mDefaultProperties.mImageColor = 0xAAAAAABB; mDefaultProperties.mImageColor = 0xAAAAAABB;
mDefaultProperties.mBackgroundImage = ":/graphics/frame.png"; mDefaultProperties.mBackgroundImage = ":/graphics/frame.png";
mDefaultProperties.mBackgroundCornerSize = Vector2f(16 ,16); mDefaultProperties.mBackgroundCornerSize = Vector2f(16.0f, 16.0f);
mDefaultProperties.mBackgroundCenterColor = 0xAAAAEEFF; mDefaultProperties.mBackgroundCenterColor = 0xAAAAEEFF;
mDefaultProperties.mBackgroundEdgeColor = 0xAAAAEEFF; mDefaultProperties.mBackgroundEdgeColor = 0xAAAAEEFF;

View file

@ -3,7 +3,7 @@
// EmulationStation Desktop Edition // EmulationStation Desktop Edition
// GridTileComponent.h // GridTileComponent.h
// //
// X*Y grid. // X*Y tile grid, used indirectly by GridGameListView via ImageGridComponent.
// //
#ifndef ES_CORE_COMPONENTS_GRID_TILE_COMPONENT_H #ifndef ES_CORE_COMPONENTS_GRID_TILE_COMPONENT_H

View file

@ -101,7 +101,7 @@ private:
Vector2f mTileSize; Vector2f mTileSize;
Vector2i mGridDimension; Vector2i mGridDimension;
std::shared_ptr<ThemeData> mTheme; std::shared_ptr<ThemeData> mTheme;
std::vector< std::shared_ptr<GridTileComponent> > mTiles; std::vector<std::shared_ptr<GridTileComponent>> mTiles;
int mStartPosition; int mStartPosition;