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