1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-26 02:03:48 +00:00

fix tex repeat in mod selector left+right bars

This commit is contained in:
fgenesis 2023-10-20 02:43:20 +02:00
parent 4c941419b4
commit 0391052e51

View file

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