1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

fix texture issue with software mipmaps (resize offending textures to be power-of-2)

This commit is contained in:
fgenesis 2022-03-31 21:05:44 +02:00
parent 96216503c4
commit dda420f6ba
4 changed files with 9 additions and 2 deletions

View file

@ -178,7 +178,7 @@ static void _MenuIconClickCallback(int id, void *user)
// can be called multiple times without causing trouble
void ModSelectorScreen::init()
{
leftbar.width = 100;
leftbar.setBarWidth(100);
leftbar.height = height;
leftbar.alpha = 0;
leftbar.alpha.interpolateTo(1, 0.2f);
@ -193,7 +193,7 @@ void ModSelectorScreen::init()
std::fill(panels.begin(), panels.end(), (IconGridPanel*)NULL);
}
rightbar.width = 100;
rightbar.setBarWidth(100);
rightbar.height = height;
rightbar.alpha = 0;
rightbar.alpha.interpolateTo(1, 0.2f);
@ -835,6 +835,12 @@ MenuBasicBar::MenuBasicBar()
shareAlphaWithChildren = false;
}
void MenuBasicBar::setBarWidth(float w)
{
width = w;
repeatToFillScale.x = texture->width / w;
}
void MenuBasicBar::init()
{
}

View file

@ -113,6 +113,7 @@ class MenuBasicBar : public Quad
{
public:
MenuBasicBar();
void setBarWidth(float w);
virtual void init();
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 16 KiB