Skip to content

Commit

Permalink
Remove unnecessary Skip and DescColor variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Robyt3 committed Sep 20, 2024
1 parent 9597241 commit 7b64152
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/game/editor/prompt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,7 @@ void CPrompt::OnRender(CUIRect _)

if(m_PromptInput.IsEmpty() || FuzzyMatch(pQuickAction->Label(), m_PromptInput.GetString()))
{
bool Skip = false;
if(m_ResetFilterResults)
if(pQuickAction == m_pLastAction)
Skip = true;
if(!Skip)
if(!m_ResetFilterResults || pQuickAction != m_pLastAction)
m_vpFilteredPromptList.push_back(pQuickAction);
}
}
Expand Down Expand Up @@ -146,9 +142,7 @@ void CPrompt::OnRender(CUIRect _)
Ui()->DoLabel(&LabelColumn, m_vpFilteredPromptList[i]->Label(), 10.0f, TEXTALIGN_ML, Props);

Props.m_MaxWidth = DescColumn.w;
ColorRGBA DescColor = TextRender()->DefaultTextColor();
DescColor.a = Item.m_Selected ? 1.0f : 0.8f;
TextRender()->TextColor(DescColor);
TextRender()->TextColor(TextRender()->DefaultTextColor().WithAlpha(Item.m_Selected ? 1.0f : 0.8f));
Ui()->DoLabel(&DescColumn, m_vpFilteredPromptList[i]->Description(), 10.0f, TEXTALIGN_MR, Props);
TextRender()->TextColor(TextRender()->DefaultTextColor());
}
Expand Down

0 comments on commit 7b64152

Please sign in to comment.