From 673fe3eb5062603953370bd31bb643f34e9d36c1 Mon Sep 17 00:00:00 2001 From: Stepland <16676308+Stepland@users.noreply.github.com> Date: Sun, 16 Feb 2020 14:52:28 +0100 Subject: [PATCH] Fix flickering glitch on ribbon --- src/Screens/MusicSelect/Panel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Screens/MusicSelect/Panel.cpp b/src/Screens/MusicSelect/Panel.cpp index 2cf9884..6828297 100644 --- a/src/Screens/MusicSelect/Panel.cpp +++ b/src/Screens/MusicSelect/Panel.cpp @@ -105,13 +105,13 @@ namespace MusicSelect { } void SongPanel::draw(sf::RenderTarget& target, sf::RenderStates states) const { - // We should gray out the panel if the currently selected difficulty doesn't exist for this song + states.transform *= getTransform(); auto selected_chart = m_resources.get_last_selected_chart(); + // We should gray out the panel if the currently selected difficulty doesn't exist for this song bool should_be_grayed_out = m_song.chart_levels.find(selected_chart) == m_song.chart_levels.end(); if (m_song.cover) { auto loaded_texture = m_resources.covers.async_get(m_song.folder/m_song.cover.value()); if (loaded_texture) { - states.transform *= getTransform(); sf::Sprite cover{*(loaded_texture->texture)}; auto alpha = static_cast( m_seconds_to_alpha.clampedTransform(