mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
made it possible to move the favorite filter on top
This commit is contained in:
parent
af31eed357
commit
8ae5eb2dcc
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue