mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix color toggles
This commit is contained in:
parent
a56fbbc340
commit
af2e02ccd2
|
@ -881,9 +881,8 @@ void CConsole::ConToggle(IConsole::IResult *pResult, void *pUser)
|
|||
bool Alpha = pData->m_Alpha;
|
||||
unsigned Cur = *pData->m_pVariable;
|
||||
ColorHSLA Val = Cur == pResult->GetColor(1, Light).Pack(Darkest, Alpha) ? pResult->GetColor(2, Light) : pResult->GetColor(1, Light);
|
||||
Cur = Val.Pack(Darkest, Alpha);
|
||||
|
||||
str_format(aBuf, sizeof(aBuf), "%s %u", pResult->GetString(0), Val.Pack(Alpha));
|
||||
str_format(aBuf, sizeof(aBuf), "%s %u", pResult->GetString(0), Val.Pack(Darkest, Alpha));
|
||||
pConsole->ExecuteLine(aBuf);
|
||||
aBuf[0] = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue