mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
Removed lots of unnecessary help component texture resizing.
This commit is contained in:
parent
081fbc5665
commit
87d6207c51
|
@ -218,7 +218,7 @@ void HelpComponent::updateGrid()
|
||||||
|
|
||||||
for (auto it = mPrompts.cbegin(); it != mPrompts.cend(); it++) {
|
for (auto it = mPrompts.cbegin(); it != mPrompts.cend(); it++) {
|
||||||
auto icon = std::make_shared<ImageComponent>(mWindow);
|
auto icon = std::make_shared<ImageComponent>(mWindow);
|
||||||
icon->setImage(getIconTexture(it->first.c_str()));
|
icon->setImage(getIconTexture(it->first.c_str()), false);
|
||||||
icon->setColorShift(isDimmed ? mStyle.iconColorDimmed : mStyle.iconColor);
|
icon->setColorShift(isDimmed ? mStyle.iconColorDimmed : mStyle.iconColor);
|
||||||
icon->setResize(0, height);
|
icon->setResize(0, height);
|
||||||
icons.push_back(icon);
|
icons.push_back(icon);
|
||||||
|
|
|
@ -170,9 +170,10 @@ void ImageComponent::setImage(const char* data, size_t length, bool tile)
|
||||||
resize();
|
resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageComponent::setImage(const std::shared_ptr<TextureResource>& texture)
|
void ImageComponent::setImage(const std::shared_ptr<TextureResource>& texture, bool resizeTexture)
|
||||||
{
|
{
|
||||||
mTexture = texture;
|
mTexture = texture;
|
||||||
|
if (resizeTexture)
|
||||||
resize();
|
resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
// Loads an image from memory.
|
// Loads an image from memory.
|
||||||
void setImage(const char* data, size_t length, bool tile = false);
|
void setImage(const char* data, size_t length, bool tile = false);
|
||||||
// Use an already existing texture.
|
// Use an already existing texture.
|
||||||
void setImage(const std::shared_ptr<TextureResource>& texture);
|
void setImage(const std::shared_ptr<TextureResource>& texture, bool resizeTexture = true);
|
||||||
|
|
||||||
void onSizeChanged() override { updateVertices(); }
|
void onSizeChanged() override { updateVertices(); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue