made it possible to move the favorite filter on top

This commit is contained in:
oy 2018-10-28 13:52:01 +01:00
parent af31eed357
commit 8ae5eb2dcc

View file

@ -666,7 +666,7 @@ bool CMenus::RenderFilterHeader(CUIRect View, int FilterIndex)
EditButtons.VSplitRight(Spacing, &EditButtons, 0);
EditButtons.VSplitRight(ButtonHeight, &EditButtons, &Button);
Button.Margin(2.0f, &Button);
if(FilterIndex > 1)
if(FilterIndex > 0 && (pFilter->Custom() > CBrowserFilter::FILTER_ALL || m_lFilters[FilterIndex-1].Custom() != CBrowserFilter::FILTER_STANDARD))
{
if(DoButton_SpriteClean(IMAGE_TOOLICONS, SPRITE_TOOL_UP_A, &Button))
Move(true, FilterIndex);
@ -677,7 +677,7 @@ bool CMenus::RenderFilterHeader(CUIRect View, int FilterIndex)
EditButtons.VSplitRight(Spacing, &EditButtons, 0);
EditButtons.VSplitRight(ButtonHeight, &EditButtons, &Button);
Button.Margin(2.0f, &Button);
if(FilterIndex > 0 && FilterIndex < m_lFilters.size()-1)
if(FilterIndex >= 0 && FilterIndex < m_lFilters.size()-1 && (pFilter->Custom() != CBrowserFilter::FILTER_STANDARD || m_lFilters[FilterIndex+1].Custom() > CBrowserFilter::FILTER_ALL))
{
if(DoButton_SpriteClean(IMAGE_TOOLICONS, SPRITE_TOOL_DOWN_A, &Button))
Move(false, FilterIndex);