mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Fix enter not working in server browser when no server selected
This commit is contained in:
parent
c8eae4c512
commit
8fad911b8b
|
@ -433,8 +433,6 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(s_ListBox.WasItemActivated())
|
|
||||||
Connect(g_Config.m_UiServerAddress);
|
|
||||||
|
|
||||||
// Render bar that shows the loading progression.
|
// Render bar that shows the loading progression.
|
||||||
// The bar is only shown while loading and fades out when it's done.
|
// The bar is only shown while loading and fades out when it's done.
|
||||||
|
@ -592,7 +590,7 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
||||||
Props.m_Color = ColorRGBA(0.5f, 1.0f, 0.5f, 0.5f);
|
Props.m_Color = ColorRGBA(0.5f, 1.0f, 0.5f, 0.5f);
|
||||||
|
|
||||||
static CButtonContainer s_ConnectButton;
|
static CButtonContainer s_ConnectButton;
|
||||||
if(UI()->DoButton_Menu(m_ConnectButton, &s_ConnectButton, ConnectLabelFunc, &ButtonConnect, Props))
|
if(UI()->DoButton_Menu(m_ConnectButton, &s_ConnectButton, ConnectLabelFunc, &ButtonConnect, Props) || s_ListBox.WasItemActivated() || UI()->ConsumeHotkey(CUI::HOTKEY_ENTER))
|
||||||
{
|
{
|
||||||
Connect(g_Config.m_UiServerAddress);
|
Connect(g_Config.m_UiServerAddress);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue