Skip to content

Commit

Permalink
Fix remaining #5127
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingJellyfish committed Jul 29, 2024
1 parent 0704f25 commit 4a9e5f0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/guiengine/skin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1490,16 +1490,29 @@ void Skin::drawRibbonChild(const core::recti &rect, Widget* widget,
return;

nPlayersOnThisItem = 1;
}
}

// Handle drawing for everyone else
for (unsigned i = 1; i < MAX_PLAYER_COUNT; i++)
{
// ---- Draw selection for other players than player 1
if (parentRibbon->isFocusedForPlayer(i) &&
parentRibbon->getSelectionIDString(i) ==
widget->m_properties[PROP_ID])
{
nPlayersOnThisItem++;
}
}

// Handle drawing for everyone else
for (unsigned i = MAX_PLAYER_COUNT - 1; i >= 1; i--)
{
// ---- Draw selection for other players than player 1
if (parentRibbon->isFocusedForPlayer(i) &&
parentRibbon->getSelectionIDString(i) ==
widget->m_properties[PROP_ID])
{
nPlayersOnThisItem--;

short red_previous = parentRibbonWidget->m_skin_r;
short green_previous = parentRibbonWidget->m_skin_g;
short blue_previous = parentRibbonWidget->m_skin_b;
Expand Down Expand Up @@ -1546,7 +1559,6 @@ void Skin::drawRibbonChild(const core::recti &rect, Widget* widget,
parentRibbonWidget->m_skin_g = green_previous;
parentRibbonWidget->m_skin_b = blue_previous;
}
nPlayersOnThisItem++;
}
}

Expand Down

0 comments on commit 4a9e5f0

Please sign in to comment.