Skip to content

Commit

Permalink
xrGame/UIProgressBar.h: Removed m_bNoLerp. This variable wasn't needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Feb 12, 2018
1 parent 496a8f1 commit 1cb97b1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIActorMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class CUIActorMenu : public CUIDialogWnd, public CUIWndCallback
EDDListType GetListType(CUIDragDropListEx* l);

public:
CUIDragDropListEx* GetListByType(EDDListType t); //Alundaio: Make public
CUIDragDropListEx* GetListByType(EDDListType t); //Alundaio: Made public

protected:
CUIDragDropListEx* GetSlotList(u16 slot_idx);
Expand Down
1 change: 0 additions & 1 deletion src/xrGame/ui/UICellItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ void CUICellItem::UpdateConditionProgressBar()
else
cond = (float)remaining_uses * 0.125f - 0.0625f;

m_pConditionState->m_bNoLerp = true;
m_pConditionState->m_bUseGradient = false;
}
}
Expand Down
9 changes: 1 addition & 8 deletions src/xrGame/ui/UIProgressBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CUIProgressBar::CUIProgressBar(void)
m_bBackgroundPresent = false;
m_bUseColor = false;
m_bUseGradient = true;
m_bNoLerp = false; //Alundaio

AttachChild(&m_UIBackgroundItem);
AttachChild(&m_UIProgressItem);
Expand Down Expand Up @@ -55,20 +54,14 @@ void CUIProgressBar::UpdateProgressBar()

if (m_bUseColor)
{
if (m_bNoLerp)
{
m_UIProgressItem.SetTextureColor(m_maxColor.get());
return;
}

if ( m_bUseGradient )
{
Fcolor curr;
curr.lerp(m_minColor, m_middleColor, m_maxColor, fCurrentLength);
m_UIProgressItem.SetTextureColor(curr.get());
}
else
m_UIProgressItem.SetTextureColor( m_maxColor.get());
m_UIProgressItem.SetTextureColor(m_maxColor.get());
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/xrGame/ui/UIProgressBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class CUIProgressBar : public CUIWindow

public:
bool m_bUseColor;
bool m_bUseGradient;
bool m_bNoLerp; //Alundaio: use only solid color with m_maxColor
bool m_bUseGradient; //Alundaio: if false then use only solid color with m_maxColor
Fcolor m_minColor;
Fcolor m_middleColor;
Fcolor m_maxColor;
Expand Down

0 comments on commit 1cb97b1

Please sign in to comment.