mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Add more gametype colors
This commit is contained in:
parent
b5d662622c
commit
3494958763
|
@ -55,11 +55,18 @@ static ColorRGBA GetPingTextColor(int Latency)
|
||||||
static ColorRGBA GetGametypeTextColor(const char *pGametype)
|
static ColorRGBA GetGametypeTextColor(const char *pGametype)
|
||||||
{
|
{
|
||||||
ColorHSLA HslaColor;
|
ColorHSLA HslaColor;
|
||||||
if(str_comp(pGametype, "DM") == 0 || str_comp(pGametype, "TDM") == 0 || str_comp(pGametype, "CTF") == 0)
|
if(str_comp(pGametype, "DM") == 0 || str_comp(pGametype, "TDM") == 0 || str_comp(pGametype, "CTF") == 0 || str_comp(pGametype, "LMS") == 0 || str_comp(pGametype, "LTS") == 0)
|
||||||
HslaColor = ColorHSLA(0.33f, 1.0f, 0.75f);
|
HslaColor = ColorHSLA(0.33f, 1.0f, 0.75f);
|
||||||
else if(str_find_nocase(pGametype, "catch"))
|
else if(str_find_nocase(pGametype, "catch"))
|
||||||
HslaColor = ColorHSLA(0.17f, 1.0f, 0.75f);
|
HslaColor = ColorHSLA(0.17f, 1.0f, 0.75f);
|
||||||
else if(str_find_nocase(pGametype, "idm") || str_find_nocase(pGametype, "itdm") || str_find_nocase(pGametype, "ictf") || str_find_nocase(pGametype, "f-ddrace"))
|
else if(str_find_nocase(pGametype, "dm") || str_find_nocase(pGametype, "tdm") || str_find_nocase(pGametype, "ctf") || str_find_nocase(pGametype, "lms") || str_find_nocase(pGametype, "lts"))
|
||||||
|
{
|
||||||
|
if(pGametype[0] == 'i' || pGametype[0] == 'g')
|
||||||
|
HslaColor = ColorHSLA(0.0f, 1.0f, 0.75f);
|
||||||
|
else
|
||||||
|
HslaColor = ColorHSLA(0.375f, 1.0f, 0.35f);
|
||||||
|
}
|
||||||
|
else if(str_find_nocase(pGametype, "f-ddrace") || str_find_nocase(pGametype, "freeze"))
|
||||||
HslaColor = ColorHSLA(0.0f, 1.0f, 0.75f);
|
HslaColor = ColorHSLA(0.0f, 1.0f, 0.75f);
|
||||||
else if(str_find_nocase(pGametype, "fng"))
|
else if(str_find_nocase(pGametype, "fng"))
|
||||||
HslaColor = ColorHSLA(0.83f, 1.0f, 0.75f);
|
HslaColor = ColorHSLA(0.83f, 1.0f, 0.75f);
|
||||||
|
|
Loading…
Reference in a new issue