mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 05:58:19 +00:00
parent
8da5957ef0
commit
2b0fb83140
|
@ -660,6 +660,27 @@ void CMenus::RenderMenubar(CUIRect Box, IClient::EClientState ClientState)
|
||||||
}
|
}
|
||||||
GameClient()->m_Tooltips.DoToolTip(&s_FavoritesButton, &Button, Localize("Favorites"));
|
GameClient()->m_Tooltips.DoToolTip(&s_FavoritesButton, &Button, Localize("Favorites"));
|
||||||
|
|
||||||
|
int MaxPage = PAGE_FAVORITES + ServerBrowser()->FavoriteCommunities().size();
|
||||||
|
if(
|
||||||
|
!Ui()->IsPopupOpen() &&
|
||||||
|
CLineInput::GetActiveInput() == nullptr &&
|
||||||
|
(g_Config.m_UiPage >= PAGE_INTERNET && g_Config.m_UiPage <= MaxPage) &&
|
||||||
|
(m_MenuPage >= PAGE_INTERNET && m_MenuPage <= PAGE_FAVORITE_COMMUNITY_5))
|
||||||
|
{
|
||||||
|
if(Input()->KeyPress(KEY_RIGHT))
|
||||||
|
{
|
||||||
|
NewPage = g_Config.m_UiPage + 1;
|
||||||
|
if(NewPage > MaxPage)
|
||||||
|
NewPage = PAGE_INTERNET;
|
||||||
|
}
|
||||||
|
if(Input()->KeyPress(KEY_LEFT))
|
||||||
|
{
|
||||||
|
NewPage = g_Config.m_UiPage - 1;
|
||||||
|
if(NewPage < PAGE_INTERNET)
|
||||||
|
NewPage = MaxPage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
size_t FavoriteCommunityIndex = 0;
|
size_t FavoriteCommunityIndex = 0;
|
||||||
static CButtonContainer s_aFavoriteCommunityButtons[5];
|
static CButtonContainer s_aFavoriteCommunityButtons[5];
|
||||||
static_assert(std::size(s_aFavoriteCommunityButtons) == (size_t)PAGE_FAVORITE_COMMUNITY_5 - PAGE_FAVORITE_COMMUNITY_1 + 1);
|
static_assert(std::size(s_aFavoriteCommunityButtons) == (size_t)PAGE_FAVORITE_COMMUNITY_5 - PAGE_FAVORITE_COMMUNITY_1 + 1);
|
||||||
|
|
Loading…
Reference in a new issue