From 0391052e51ebbb1b0b0d178818385186e8bc0452 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Fri, 20 Oct 2023 02:43:20 +0200 Subject: [PATCH] fix tex repeat in mod selector left+right bars --- Aquaria/ModSelector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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()