Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWillden committed Oct 18, 2020
1 parent 8e1f36e commit 5cc9ec9
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions cl_dll/ff/vgui/ff_quantityitem.cpp
Expand Up @@ -614,10 +614,13 @@ namespace vgui
}
}

void FFQuantityItem::SetBarColor( Color newBarColor )
{
m_clrBarCustomColor = newBarColor;
RecalculateColor(m_ColorBar, m_iBarColorMode, m_clrBarCustomColor);
void FFQuantityItem::SetBarColor( Color newBarColor )
{
if(m_clrBarCustomColor != newBarColor)
{
m_clrBarCustomColor = newBarColor;
RecalculateColor(m_ColorBar, m_iBarColorMode, m_clrBarCustomColor);
}
}

void FFQuantityItem::SetBarBorderColor( Color newBarBorderColor )
Expand Down Expand Up @@ -1005,15 +1008,9 @@ namespace vgui
SetBarColorMode(iColorMode);
}

bool bValidColor = false;
Color color = Color(iRed, iGreen, iBlue, iAlpha);
if(iRed != -1 && iGreen != -1 && iBlue != -1 && iAlpha != -1)
{
bValidColor = true;
}

if(m_clrBarCustomColor != color && bValidColor)
{
Color color = Color(iRed, iGreen, iBlue, iAlpha);
SetBarColor(color);
}
}
Expand Down

0 comments on commit 5cc9ec9

Please sign in to comment.