Skip to content

Commit 92e9ee8

Browse files
committedNov 17, 2018
fixed not expanding the filter by using the tool icons. closes #1682
·
0.7.50.7.1
1 parent d0f286b commit 92e9ee8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎src/game/client/components/menus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ class CMenus : public CComponent
399399
};
400400
// buttons var
401401
int m_SwitchButton;
402+
int m_aButtonID[3];
402403

403404
CBrowserFilter() {}
404405
CBrowserFilter(int Custom, const char* pName, IServerBrowser *pServerBrowser);

‎src/game/client/components/menus_browser.cpp‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,8 @@ bool CMenus::RenderFilterHeader(CUIRect View, int FilterIndex)
701701
EditButtons.VSplitRight(Spacing, &EditButtons, 0);
702702
EditButtons.VSplitRight(ButtonHeight, &EditButtons, &Button);
703703
Button.Margin(2.0f, &Button);
704-
if(DoButton_SpriteClean(IMAGE_TOOLICONS, SPRITE_TOOL_EDIT_A, &Button))
704+
DoIcon(IMAGE_TOOLICONS, SPRITE_TOOL_EDIT_A, &Button);
705+
if(UI()->DoButtonLogic(&pFilter->m_aButtonID[2], "", 0, &Button))
705706
{
706707
static int s_EditPopupID = 0;
707708
m_SelectedFilter = FilterIndex;
@@ -714,7 +715,8 @@ bool CMenus::RenderFilterHeader(CUIRect View, int FilterIndex)
714715
Button.Margin(2.0f, &Button);
715716
if(FilterIndex > 0 && (pFilter->Custom() > CBrowserFilter::FILTER_ALL || m_lFilters[FilterIndex-1].Custom() != CBrowserFilter::FILTER_STANDARD))
716717
{
717-
if(DoButton_SpriteClean(IMAGE_TOOLICONS, SPRITE_TOOL_UP_A, &Button))
718+
DoIcon(IMAGE_TOOLICONS, SPRITE_TOOL_UP_A, &Button);
719+
if(UI()->DoButtonLogic(&pFilter->m_aButtonID[0], "", 0, &Button))
718720
{
719721
Move(true, FilterIndex);
720722
Switch = false;
@@ -728,7 +730,8 @@ bool CMenus::RenderFilterHeader(CUIRect View, int FilterIndex)
728730
Button.Margin(2.0f, &Button);
729731
if(FilterIndex >= 0 && FilterIndex < m_lFilters.size()-1 && (pFilter->Custom() != CBrowserFilter::FILTER_STANDARD || m_lFilters[FilterIndex+1].Custom() > CBrowserFilter::FILTER_ALL))
730732
{
731-
if(DoButton_SpriteClean(IMAGE_TOOLICONS, SPRITE_TOOL_DOWN_A, &Button))
733+
DoIcon(IMAGE_TOOLICONS, SPRITE_TOOL_DOWN_A, &Button);
734+
if(UI()->DoButtonLogic(&pFilter->m_aButtonID[1], "", 0, &Button))
732735
{
733736
Move(false, FilterIndex);
734737
Switch = false;

0 commit comments

Comments
 (0)
Please sign in to comment.