mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Key up/down only change selected server, not friend list
This commit is contained in:
parent
dc162d02fc
commit
d3a411afa6
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue