mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
started writing the friends browser page
This commit is contained in:
parent
01c7a06c22
commit
5845665ba6
|
@ -1163,10 +1163,17 @@ void CMenus::RenderMenubar(CUIRect r)
|
||||||
g_Config.m_UiBrowserPage = PAGE_LAN;
|
g_Config.m_UiBrowserPage = PAGE_LAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char aBuf[32];
|
||||||
|
if(m_BorwserPage == PAGE_BROWSER_BROWSER)
|
||||||
|
str_copy(aBuf, Localize("Friends"), sizeof(aBuf));
|
||||||
|
else if(m_BorwserPage == PAGE_BROWSER_FRIENDS)
|
||||||
|
str_copy(aBuf, Localize("Browser"), sizeof(aBuf));
|
||||||
static int s_FilterButton=0;
|
static int s_FilterButton=0;
|
||||||
if(DoButton_Menu(&s_FilterButton, Localize("Filter"), 0, &Right))
|
if(DoButton_Menu(&s_FilterButton, aBuf, 0, &Right))
|
||||||
{
|
{
|
||||||
// TODO
|
m_BorwserPage++;
|
||||||
|
if(m_BorwserPage >= NUM_PAGE_BROWSER)
|
||||||
|
m_BorwserPage = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(m_MenuPage == PAGE_DEMOS)
|
else if(m_MenuPage == PAGE_DEMOS)
|
||||||
|
|
|
@ -135,6 +135,10 @@ class CMenus : public CComponent
|
||||||
PAGE_SYSTEM,
|
PAGE_SYSTEM,
|
||||||
PAGE_START,
|
PAGE_START,
|
||||||
|
|
||||||
|
PAGE_BROWSER_BROWSER=0,
|
||||||
|
PAGE_BROWSER_FRIENDS,
|
||||||
|
NUM_PAGE_BROWSER,
|
||||||
|
|
||||||
SETTINGS_GENERAL=0,
|
SETTINGS_GENERAL=0,
|
||||||
SETTINGS_PLAYER,
|
SETTINGS_PLAYER,
|
||||||
SETTINGS_TEE,
|
SETTINGS_TEE,
|
||||||
|
@ -147,6 +151,7 @@ class CMenus : public CComponent
|
||||||
int m_Popup;
|
int m_Popup;
|
||||||
int m_ActivePage;
|
int m_ActivePage;
|
||||||
int m_MenuPage;
|
int m_MenuPage;
|
||||||
|
int m_BorwserPage;
|
||||||
bool m_MenuActive;
|
bool m_MenuActive;
|
||||||
bool m_UseMouseButtons;
|
bool m_UseMouseButtons;
|
||||||
vec2 m_MousePos;
|
vec2 m_MousePos;
|
||||||
|
@ -428,6 +433,7 @@ class CMenus : public CComponent
|
||||||
// found in menus_browser.cpp
|
// found in menus_browser.cpp
|
||||||
int m_ScrollOffset;
|
int m_ScrollOffset;
|
||||||
void RenderServerbrowserServerList(CUIRect View);
|
void RenderServerbrowserServerList(CUIRect View);
|
||||||
|
void RenderServerbrowserFriendList(CUIRect View);
|
||||||
void RenderServerbrowserServerDetail(CUIRect View, const CServerInfo *pInfo);
|
void RenderServerbrowserServerDetail(CUIRect View, const CServerInfo *pInfo);
|
||||||
void RenderServerbrowserFilters(CUIRect View);
|
void RenderServerbrowserFilters(CUIRect View);
|
||||||
void RenderServerbrowserFriends(CUIRect View);
|
void RenderServerbrowserFriends(CUIRect View);
|
||||||
|
|
|
@ -1622,9 +1622,10 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
|
||||||
|
|
||||||
|
|
||||||
// server list
|
// server list
|
||||||
{
|
if(m_BorwserPage == PAGE_BROWSER_BROWSER)
|
||||||
RenderServerbrowserServerList(ServerList);
|
RenderServerbrowserServerList(ServerList);
|
||||||
}
|
else if(m_BorwserPage == PAGE_BROWSER_FRIENDS)
|
||||||
|
RenderServerbrowserFriendList(ServerList);
|
||||||
|
|
||||||
/*// background
|
/*// background
|
||||||
RenderTools()->DrawUIRect(&MainView, vec4(0.0f, 0.0f, 0.0f, 0.25f), CUI::CORNER_ALL, 12.0f);
|
RenderTools()->DrawUIRect(&MainView, vec4(0.0f, 0.0f, 0.0f, 0.25f), CUI::CORNER_ALL, 12.0f);
|
||||||
|
@ -1660,6 +1661,19 @@ void CMenus::RenderServerbrowser(CUIRect MainView)
|
||||||
RenderServerbrowserOverlay();
|
RenderServerbrowserOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// firend list
|
||||||
|
|
||||||
|
void CMenus::RenderServerbrowserFriendList(CUIRect View)
|
||||||
|
{
|
||||||
|
//CUIRect Headers, Status, InfoButton;
|
||||||
|
|
||||||
|
//float SpacingH = 2.0f;
|
||||||
|
//float ButtonHeight = 20.0f;
|
||||||
|
|
||||||
|
// background
|
||||||
|
RenderTools()->DrawUIRect(&View, vec4(0.0f, 0.0f, 0.0f, 0.25f), CUI::CORNER_ALL, 5.0f);
|
||||||
|
}
|
||||||
|
|
||||||
void CMenus::ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
void CMenus::ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
||||||
{
|
{
|
||||||
pfnCallback(pResult, pCallbackUserData);
|
pfnCallback(pResult, pCallbackUserData);
|
||||||
|
|
Loading…
Reference in a new issue