mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Revert "Client won't vote on comments by Sushi Tee" caused crashes
This reverts commit ed7a1d5bcd
.
This commit is contained in:
parent
881fd901a6
commit
45fa3d49b5
|
@ -129,7 +129,7 @@ int CMenus::DoButton_Icon(int ImageId, int SpriteId, const CUIRect *pRect)
|
|||
|
||||
int CMenus::DoButton_Menu(const void *pID, const char *pText, int Checked, const CUIRect *pRect)
|
||||
{
|
||||
RenderTools()->DrawUIRect(pRect, (Checked<0)?vec4(0,0,0,0.5f):vec4(1,1,1,0.5f)*ButtonColorMul(pID), CUI::CORNER_ALL, 5.0f);
|
||||
RenderTools()->DrawUIRect(pRect, vec4(1,1,1,0.5f)*ButtonColorMul(pID), CUI::CORNER_ALL, 5.0f);
|
||||
UI()->DoLabel(pRect, pText, pRect->h*ms_FontmodHeight, 0);
|
||||
return UI()->DoButtonLogic(pID, pText, Checked, pRect);
|
||||
}
|
||||
|
|
|
@ -400,19 +400,8 @@ void CMenus::RenderServerControl(CUIRect MainView)
|
|||
CUIRect Button;
|
||||
Bottom.VSplitRight(120.0f, &Bottom, &Button);
|
||||
|
||||
int Vote = m_CallvoteSelectedOption;
|
||||
CVoting::CVoteOption *pOption = m_pClient->m_pVoting->m_pFirst;
|
||||
while(pOption && Vote >= 0)
|
||||
{
|
||||
if(!Vote)
|
||||
break;
|
||||
|
||||
Vote--;
|
||||
pOption = pOption->m_pNext;
|
||||
}
|
||||
|
||||
static int s_CallVoteButton = 0;
|
||||
if(DoButton_Menu(&s_CallVoteButton, Localize("Call vote"), (pOption->m_aCommand[0] < 97 || pOption->m_aCommand[0] > 122)?-1:0, &Button))
|
||||
if(DoButton_Menu(&s_CallVoteButton, Localize("Call vote"), 0, &Button))
|
||||
{
|
||||
if(s_ControlPage == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue