diff options
| author | oy <Tom_Adams@web.de> | 2011-04-13 20:37:12 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-13 20:37:12 +0200 |
| commit | 06115dd49dca2f8eb5f14606437e8fd20037cc4d (patch) | |
| tree | 5ec4bca6158319b3f5285d7689c5f94ae8da8c93 /src/game/client/components/menus_ingame.cpp | |
| parent | 63e059b8fff6498e42b765a1dca000e53005ea77 (diff) | |
| download | zcatch-06115dd49dca2f8eb5f14606437e8fd20037cc4d.tar.gz zcatch-06115dd49dca2f8eb5f14606437e8fd20037cc4d.zip | |
added "Whitespace and line Endings cleanup" by GreYFoX
Diffstat (limited to 'src/game/client/components/menus_ingame.cpp')
| -rw-r--r-- | src/game/client/components/menus_ingame.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/game/client/components/menus_ingame.cpp b/src/game/client/components/menus_ingame.cpp index 4737f38d..33aaa14f 100644 --- a/src/game/client/components/menus_ingame.cpp +++ b/src/game/client/components/menus_ingame.cpp @@ -28,12 +28,12 @@ void CMenus::RenderGame(CUIRect MainView) CUIRect Button, ButtonBar; MainView.HSplitTop(45.0f, &ButtonBar, &MainView); RenderTools()->DrawUIRect(&ButtonBar, ms_ColorTabbarActive, CUI::CORNER_ALL, 10.0f); - + // button bar ButtonBar.HSplitTop(10.0f, 0, &ButtonBar); ButtonBar.HSplitTop(25.0f, &ButtonBar, 0); ButtonBar.VMargin(10.0f, &ButtonBar); - + ButtonBar.VSplitRight(120.0f, &ButtonBar, &Button); static int s_DisconnectButton = 0; if(DoButton_Menu(&s_DisconnectButton, Localize("Disconnect"), 0, &Button)) @@ -52,7 +52,7 @@ void CMenus::RenderGame(CUIRect MainView) SetActive(false); } } - + if(m_pClient->m_Snap.m_pGameInfoObj->m_GameFlags & GAMEFLAG_TEAMS) { if(m_pClient->m_Snap.m_pLocalInfo->m_Team != TEAM_RED) @@ -193,7 +193,7 @@ void CMenus::RenderPlayers(CUIRect MainView) else m_pClient->Friends()->AddFriend(m_pClient->m_aClients[i].m_aName, m_pClient->m_aClients[i].m_aClan); } - + /* CUIRect bars; votearea.HSplitTop(10.0f, 0, &votearea); @@ -220,7 +220,7 @@ void CMenus::RenderPlayers(CUIRect MainView) static int no_button = 0; if(UI()->DoButton(&no_button, "No", 0, &button, ui_draw_menu_button, 0)) gameclient.voting->vote(-1); - + // do time left votearea.VSplitRight(50.0f, &votearea, &button); char buf[256]; @@ -236,10 +236,10 @@ void CMenus::RenderPlayers(CUIRect MainView) // do bars bars.HSplitTop(10.0f, 0, &bars); bars.HMargin(5.0f, &bars); - + gameclient.voting->render_bars(bars, true); - } + } else { UI()->DoLabel(&votearea, "No vote in progress", 18.0f, -1); @@ -254,33 +254,33 @@ void CMenus::RenderServerInfo(CUIRect MainView) // fetch server info CServerInfo CurrentServerInfo; Client()->GetServerInfo(&CurrentServerInfo); - + // render background RenderTools()->DrawUIRect(&MainView, ms_ColorTabbarActive, CUI::CORNER_ALL, 10.0f); - + CUIRect View, ServerInfo, GameInfo, Motd; - + float x = 0.0f; float y = 0.0f; - + char aBuf[1024]; - + // set view to use for all sub-modules MainView.Margin(10.0f, &View); - + // serverinfo View.HSplitTop(View.h/2/UI()->Scale()-5.0f, &ServerInfo, &Motd); ServerInfo.VSplitLeft(View.w/2/UI()->Scale()-5.0f, &ServerInfo, &GameInfo); RenderTools()->DrawUIRect(&ServerInfo, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f); - + ServerInfo.Margin(5.0f, &ServerInfo); - + x = 5.0f; y = 0.0f; - + TextRender()->Text(0, ServerInfo.x+x, ServerInfo.y+y, 32, Localize("Server info"), 250); y += 32.0f+5.0f; - + mem_zero(aBuf, sizeof(aBuf)); str_format( aBuf, @@ -296,9 +296,9 @@ void CMenus::RenderServerInfo(CUIRect MainView) Localize("Version"), CurrentServerInfo.m_aVersion, Localize("Password"), CurrentServerInfo.m_Flags &1 ? Localize("Yes") : Localize("No") ); - + TextRender()->Text(0, ServerInfo.x+x, ServerInfo.y+y, 20, aBuf, 250); - + { CUIRect Button; int IsFavorite = ServerBrowser()->IsFavorite(CurrentServerInfo.m_NetAddr); @@ -312,19 +312,19 @@ void CMenus::RenderServerInfo(CUIRect MainView) ServerBrowser()->AddFavorite(CurrentServerInfo.m_NetAddr); } } - + // gameinfo GameInfo.VSplitLeft(10.0f, 0x0, &GameInfo); RenderTools()->DrawUIRect(&GameInfo, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f); - + GameInfo.Margin(5.0f, &GameInfo); - + x = 5.0f; y = 0.0f; - + TextRender()->Text(0, GameInfo.x+x, GameInfo.y+y, 32, Localize("Game info"), 250); y += 32.0f+5.0f; - + if(m_pClient->m_Snap.m_pGameInfoObj) { mem_zero(aBuf, sizeof(aBuf)); @@ -346,7 +346,7 @@ void CMenus::RenderServerInfo(CUIRect MainView) ); TextRender()->Text(0, GameInfo.x+x, GameInfo.y+y, 20, aBuf, 250); } - + // motd Motd.HSplitTop(10.0f, 0, &Motd); RenderTools()->DrawUIRect(&Motd, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f); @@ -364,15 +364,15 @@ void CMenus::RenderServerControlServer(CUIRect MainView) static float s_ScrollValue = 0; CUIRect List = MainView; UiDoListboxStart(&s_VoteList, &List, 24.0f, "", "", m_pClient->m_pVoting->m_NumVoteOptions, 1, m_CallvoteSelectedOption, s_ScrollValue); - + for(CVoteOptionClient *pOption = m_pClient->m_pVoting->m_pFirst; pOption; pOption = pOption->m_pNext) { CListboxItem Item = UiDoListboxNextItem(pOption); - + if(Item.m_Visible) UI()->DoLabelScaled(&Item.m_Rect, pOption->m_aDescription, 16.0f, -1); } - + m_CallvoteSelectedOption = UiDoListboxEnd(&s_ScrollValue, 0); } @@ -396,11 +396,11 @@ void CMenus::RenderServerControlKick(CUIRect MainView, bool FilterSpectators) static float s_ScrollValue = 0; CUIRect List = MainView; UiDoListboxStart(&s_VoteList, &List, 24.0f, "", "", NumOptions, 1, Selected, s_ScrollValue); - + for(int i = 0; i < NumOptions; i++) { CListboxItem Item = UiDoListboxNextItem(&aPlayerIDs[i]); - + if(Item.m_Visible) { CTeeRenderInfo Info = m_pClient->m_aClients[aPlayerIDs[i]].m_RenderInfo; @@ -411,7 +411,7 @@ void CMenus::RenderServerControlKick(CUIRect MainView, bool FilterSpectators) UI()->DoLabelScaled(&Item.m_Rect, m_pClient->m_aClients[aPlayerIDs[i]].m_aName, 16.0f, -1); } } - + Selected = UiDoListboxEnd(&s_ScrollValue, 0); m_CallvoteSelectedPlayer = Selected != -1 ? aPlayerIDs[Selected] : -1; } @@ -419,7 +419,7 @@ void CMenus::RenderServerControlKick(CUIRect MainView, bool FilterSpectators) void CMenus::RenderServerControl(CUIRect MainView) { static int s_ControlPage = 0; - + // render background CUIRect Bottom, Extended, TabBar, Button; MainView.HSplitTop(20.0f, &Bottom, &MainView); @@ -461,7 +461,7 @@ void CMenus::RenderServerControl(CUIRect MainView) { CUIRect Button; Bottom.VSplitRight(120.0f, &Bottom, &Button); - + static int s_CallVoteButton = 0; if(DoButton_Menu(&s_CallVoteButton, Localize("Call vote"), 0, &Button)) { @@ -487,7 +487,7 @@ void CMenus::RenderServerControl(CUIRect MainView) } m_aCallvoteReason[0] = 0; } - + // render kick reason CUIRect Reason; Bottom.VSplitRight(40.0f, &Bottom, 0); @@ -499,7 +499,7 @@ void CMenus::RenderServerControl(CUIRect MainView) Reason.VSplitLeft(w+10.0f, 0, &Reason); static float s_Offset = 0.0f; DoEditBox(&m_aCallvoteReason, &Reason, m_aCallvoteReason, sizeof(m_aCallvoteReason), 14.0f, &s_Offset, false, CUI::CORNER_ALL); - + // extended features (only available when authed in rcon) if(Client()->RconAuthed()) { @@ -545,7 +545,7 @@ void CMenus::RenderServerControl(CUIRect MainView) static int s_RemoveVoteButton = 0; if(DoButton_Menu(&s_RemoveVoteButton, Localize("Remove"), 0, &Button)) m_pClient->m_pVoting->RemovevoteOption(m_CallvoteSelectedOption); - + // add vote Extended.HSplitTop(20.0f, &Bottom, &Extended); @@ -571,7 +571,7 @@ void CMenus::RenderServerControl(CUIRect MainView) static float s_OffsetDesc = 0.0f; DoEditBox(&s_aVoteDescription, &Button, s_aVoteDescription, sizeof(s_aVoteDescription), 14.0f, &s_OffsetDesc, false, CUI::CORNER_ALL); - Bottom.VMargin(20.0f, &Button); + Bottom.VMargin(20.0f, &Button); static float s_OffsetCmd = 0.0f; DoEditBox(&s_aVoteCommand, &Button, s_aVoteCommand, sizeof(s_aVoteCommand), 14.0f, &s_OffsetCmd, false, CUI::CORNER_ALL); } |