Fix flickering glitch on ribbon
This commit is contained in:
parent
bc1f37c90b
commit
673fe3eb50
@ -105,13 +105,13 @@ namespace MusicSelect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SongPanel::draw(sf::RenderTarget& target, sf::RenderStates states) const {
|
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();
|
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();
|
bool should_be_grayed_out = m_song.chart_levels.find(selected_chart) == m_song.chart_levels.end();
|
||||||
if (m_song.cover) {
|
if (m_song.cover) {
|
||||||
auto loaded_texture = m_resources.covers.async_get(m_song.folder/m_song.cover.value());
|
auto loaded_texture = m_resources.covers.async_get(m_song.folder/m_song.cover.value());
|
||||||
if (loaded_texture) {
|
if (loaded_texture) {
|
||||||
states.transform *= getTransform();
|
|
||||||
sf::Sprite cover{*(loaded_texture->texture)};
|
sf::Sprite cover{*(loaded_texture->texture)};
|
||||||
auto alpha = static_cast<std::uint8_t>(
|
auto alpha = static_cast<std::uint8_t>(
|
||||||
m_seconds_to_alpha.clampedTransform(
|
m_seconds_to_alpha.clampedTransform(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user