Key up/down only change selected server, not friend list

This commit is contained in:
def 2016-04-27 20:26:33 +02:00
parent dc162d02fc
commit d3a411afa6
3 changed files with 4 additions and 4 deletions

View file

@ -85,7 +85,7 @@ class CMenus : public CComponent
void UiDoListboxStart(const void *pID, const CUIRect *pRect, float RowHeight, const char *pTitle, const char *pBottomText, int NumItems,
int ItemsPerRow, int SelectedIndex, float ScrollValue);
CListboxItem UiDoListboxNextItem(const void *pID, bool Selected = false);
CListboxItem UiDoListboxNextItem(const void *pID, bool Selected = false, bool KeyEvents = true);
CListboxItem UiDoListboxNextRow();
int UiDoListboxEnd(float *pScrollValue, bool *pItemActivated);

View file

@ -1068,7 +1068,7 @@ void CMenus::RenderServerbrowserFriends(CUIRect View)
m_lFriends.sort_range();
for(int i = 0; i < m_lFriends.size(); ++i)
{
CListboxItem Item = UiDoListboxNextItem(&m_lFriends[i]);
CListboxItem Item = UiDoListboxNextItem(&m_lFriends[i], false, false);
if(Item.m_Visible)
{

View file

@ -567,7 +567,7 @@ CMenus::CListboxItem CMenus::UiDoListboxNextRow()
return Item;
}
CMenus::CListboxItem CMenus::UiDoListboxNextItem(const void *pId, bool Selected)
CMenus::CListboxItem CMenus::UiDoListboxNextItem(const void *pId, bool Selected, bool KeyEvents)
{
int ThisItemIndex = gs_ListBoxItemIndex;
if(Selected)
@ -595,7 +595,7 @@ CMenus::CListboxItem CMenus::UiDoListboxNextItem(const void *pId, bool Selected)
gs_ListBoxItemActivated = true;
UI()->SetActiveItem(0);
}
else
else if(KeyEvents)
{
for(int i = 0; i < m_NumInputEvents; i++)
{