From 61201fea1311b62bd5390a3f1684695073315290 Mon Sep 17 00:00:00 2001 From: Choupom Date: Sat, 9 Oct 2010 20:34:17 +0200 Subject: added reason to kick a player in the callvote tab --- src/game/client/components/menus_ingame.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/game/client/components/menus_ingame.cpp') diff --git a/src/game/client/components/menus_ingame.cpp b/src/game/client/components/menus_ingame.cpp index f1a4b0dd..972b1f59 100644 --- a/src/game/client/components/menus_ingame.cpp +++ b/src/game/client/components/menus_ingame.cpp @@ -414,12 +414,28 @@ void CMenus::RenderServerControl(CUIRect MainView) if(m_CallvoteSelectedPlayer >= 0 && m_CallvoteSelectedPlayer < MAX_CLIENTS && m_pClient->m_Snap.m_paPlayerInfos[m_CallvoteSelectedPlayer]) { - m_pClient->m_pVoting->CallvoteKick(m_CallvoteSelectedPlayer); + m_pClient->m_pVoting->CallvoteKick(m_CallvoteSelectedPlayer, m_aCallvoteReason); + m_aCallvoteReason[0] = 0; SetActive(false); } } } - + + // render kick reason + if(s_ControlPage == 1) + { + CUIRect Reason; + Bottom.VSplitRight(140.0f, &Bottom, &Reason); + Bottom.VSplitRight(200.0f, &Bottom, &Reason); + const char *pLabel = Localize("Reason:"); + UI()->DoLabel(&Reason, pLabel, 14.0f, -1); + float w = TextRender()->TextWidth(0, 14.0f, pLabel, -1); + Reason.VSplitLeft(w, 0, &Reason); + Reason.VSplitLeft(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); + } + // force vote button (only available when authed in rcon) if(Client()->RconAuthed()) { -- cgit 1.4.1