Skip to content

Commit

Permalink
change colours (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTadeusz authored Aug 1, 2024
1 parent a131241 commit 9d04458
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 40 deletions.
22 changes: 13 additions & 9 deletions mp/game/neo/scripts/HudLayout.res
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
"needle_visible" "0"
"needle_colored" "0"
"objective_visible" "1"
"box_color" "100 100 100 178"
"box_color" "200 200 200 40"
}
NHudWeapon
{
Expand All @@ -549,7 +549,7 @@
"ypos" "446"
"wide" "203"
"tall" "32"
"box_color" "100 100 100 178"
"box_color" "200 200 200 40"
"top_left_corner" "1"
"top_right_corner" "1"
"bottom_left_corner" "1"
Expand All @@ -564,8 +564,9 @@
"digit2_ypos" "16"
"icon_xpos" "3"
"icon_ypos" "5"
"ammo_color" "255 255 255 178"
"emptied_ammo_color" "255 255 255 89"
"ammo_text_color" "255 255 255 100"
"ammo_color" "255 255 255 150"
"emptied_ammo_color" "255 255 255 50"
}
NHudHealth
{
Expand All @@ -576,7 +577,7 @@
"ypos" "446"
"wide" "203"
"tall" "32"
"box_color" "100 100 100 178"
"box_color" "200 200 200 40"
"top_left_corner" "1"
"top_right_corner" "1"
"bottom_left_corner" "1"
Expand All @@ -589,7 +590,8 @@
"healthbar_h" "6"
"healthnum_xpos" "198"
"healthnum_ypos" "2"
"health_color" "255 255 255 178"
"health_text_color" "255 255 255 100"
"health_color" "255 255 255 150"
"camotext_xpos" "6"
"camotext_ypos" "12"
"camobar_xpos" "86"
Expand All @@ -598,7 +600,8 @@
"camobar_h" "6"
"camonum_xpos" "198"
"camonum_ypos" "12"
"camo_color" "255 255 255 178"
"camo_text_color" "255 255 255 100"
"camo_color" "255 255 255 150"
"sprinttext_xpos" "6"
"sprinttext_ypos" "22"
"sprintbar_xpos" "86"
Expand All @@ -607,7 +610,8 @@
"sprintbar_h" "6"
"sprintnum_xpos" "198"
"sprintnum_ypos" "22"
"sprint_color" "255 255 255 178"
"sprint_text_color" "255 255 255 100"
"sprint_color" "255 255 255 150"
}
RoundResult
{
Expand All @@ -618,7 +622,7 @@
NRoundState
{
"fieldName" "NRoundState"
"box_color" "100 100 100 178"
"box_color" "200 200 200 40"
"health_monochrome" "1"
}
}
5 changes: 3 additions & 2 deletions mp/src/game/client/neo/ui/neo_hud_ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void CNEOHud_Ammo::DrawAmmo() const
DrawNeoHudRoundedBox(xpos, ypos, xpos + wide, ypos + tall, box_color, top_left_corner, top_right_corner, bottom_left_corner, bottom_right_corner);

surface()->DrawSetTextFont(m_hSmallTextFont);
surface()->DrawSetTextColor(ammo_color);
surface()->DrawSetTextColor(ammo_text_color);
int fontWidth, fontHeight;
surface()->GetTextSize(m_hSmallTextFont, unicodeWepName, fontWidth, fontHeight);
surface()->DrawSetTextPos((text_xpos + xpos) - fontWidth, text_ypos + ypos);
Expand Down Expand Up @@ -154,7 +154,7 @@ void CNEOHud_Ammo::DrawAmmo() const
surface()->DrawSetTextPos(digit2_xpos + xpos - fontWidth, digit2_ypos + ypos);
surface()->DrawPrintText(unicodeClipsText, textLen);
}

const char* ammoChar = nullptr;
int fireModeWidth = 0, fireModeHeight = 0;
int magSizeMax = 0;
Expand Down Expand Up @@ -203,6 +203,7 @@ void CNEOHud_Ammo::DrawAmmo() const
}
}

surface()->DrawSetTextColor(ammo_color);
if (digit_as_number && activeWep->UsesClipsForAmmo1())
{ // Draw bullets in magazine in number form
surface()->DrawSetTextFont(m_hBulletFont);
Expand Down
7 changes: 4 additions & 3 deletions mp/src/game/client/neo/ui/neo_hud_ammo.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CNEOHud_Ammo : public CNEOHud_ChildElement, public CHudElement, public vgu
CPanelAnimationVarAliasType(int, tall, "tall", "32", "proportional_ypos");
CPanelAnimationVarAliasType(int, visible, "visible", "1", "int");
CPanelAnimationVarAliasType(int, enabled, "enabled", "1", "int");
CPanelAnimationVar(Color, box_color, "box_color", "100 100 100 178");
CPanelAnimationVar(Color, box_color, "box_color", "200 200 200 40");

CPanelAnimationVarAliasType(bool, top_left_corner, "top_left_corner", "1", "bool");
CPanelAnimationVarAliasType(bool, top_right_corner, "top_right_corner", "1", "bool");
Expand All @@ -61,8 +61,9 @@ class CNEOHud_Ammo : public CNEOHud_ChildElement, public CHudElement, public vgu
CPanelAnimationVarAliasType(int, digit2_ypos, "digit2_ypos", "16", "proportional_ypos");
CPanelAnimationVarAliasType(int, icon_xpos, "icon_xpos", "3", "proportional_xpos");
CPanelAnimationVarAliasType(int, icon_ypos, "icon_ypos", "5", "proportional_ypos");
CPanelAnimationVar(Color, ammo_color, "ammo_color", "255 255 255 178");
CPanelAnimationVar(Color, emptied_ammo_color, "emptied_ammo_color", "255 255 255 89");
CPanelAnimationVar(Color, ammo_text_color, "ammo_text_color", "255 255 255 100");
CPanelAnimationVar(Color, ammo_color, "ammo_color", "255 255 255 150");
CPanelAnimationVar(Color, emptied_ammo_color, "emptied_ammo_color", "255 255 255 50");
private:
CNEOHud_Ammo(const CNEOHud_Ammo& other);
};
Expand Down
12 changes: 0 additions & 12 deletions mp/src/game/client/neo/ui/neo_hud_compass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,6 @@ void CNEOHud_Compass::DrawCompass() const
}
}
}

const Color fadeEndColor(m_boxColor.r(), m_boxColor.g(), m_boxColor.b(), 255);
DrawNeoHudRoundedBoxFaded(
resXHalf - xBoxWidthHalf, m_resY - yBoxHeight - margin,
resXHalf, m_resY - margin,
fadeEndColor, 255, 0, true,
true, false, true, false);
DrawNeoHudRoundedBoxFaded(
resXHalf, m_resY - yBoxHeight - margin,
resXHalf + xBoxWidthHalf, m_resY - margin,
fadeEndColor, 0, 255, true,
false, true, false, true);
}

void CNEOHud_Compass::DrawDebugCompass() const
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/client/neo/ui/neo_hud_compass.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CNEOHud_Compass : public CNEOHud_ChildElement, public CHudElement, public
CPanelAnimationVarAliasType(bool, m_needleVisible, "needle_visible", "0", "bool");
CPanelAnimationVarAliasType(bool, m_needleColored, "needle_colored", "0", "bool");
CPanelAnimationVarAliasType(bool, m_objectiveVisible, "objective_visible", "1", "bool");
CPanelAnimationVar(Color, m_boxColor, "box_color", "100 100 100 178");
CPanelAnimationVar(Color, m_boxColor, "box_color", "200 200 200 40");

private:
CNEOHud_Compass(const CNEOHud_Compass &other);
Expand Down
17 changes: 9 additions & 8 deletions mp/src/game/client/neo/ui/neo_hud_health_thermoptic_aux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,31 +144,31 @@ void CNEOHud_HTA::DrawHTA() const
DrawNeoHudRoundedBox(xpos, ypos, xpos + wide, ypos + tall, m_boxColor, top_left_corner, top_right_corner, bottom_left_corner, bottom_right_corner);

surface()->DrawSetTextFont(m_hFont);
surface()->DrawSetTextColor(m_healthColor);
surface()->DrawSetTextColor(m_healthTextColor);
surface()->DrawSetTextPos(healthtext_xpos + xpos, healthtext_ypos + ypos);
surface()->DrawPrintText(L"INTEGRITY", 9);
if (playerIsNotSupport)
{
surface()->DrawSetTextColor(m_camoColor);
surface()->DrawSetTextColor(m_camoTextColor);
surface()->DrawSetTextPos(camotext_xpos + xpos, camotext_ypos + ypos);
surface()->DrawPrintText(L"THERM-OPTIC", 11);
surface()->DrawSetTextColor(m_sprintColor);
surface()->DrawSetTextColor(m_sprintTextColor);
surface()->DrawSetTextPos(sprinttext_xpos + xpos, sprinttext_ypos + ypos);
surface()->DrawPrintText(L"AUX", 3);
}

int fontWidth, fontHeight;
surface()->DrawSetTextColor(m_healthColor);
surface()->DrawSetTextColor(m_healthTextColor);
surface()->GetTextSize(m_hFont, unicodeValue_Integrity, fontWidth, fontHeight);
surface()->DrawSetTextPos(healthnum_xpos + xpos - fontWidth, healthnum_ypos + ypos);
surface()->DrawPrintText(unicodeValue_Integrity, valLen_Integrity);
if (playerIsNotSupport)
{
surface()->DrawSetTextColor(m_camoColor);
surface()->DrawSetTextColor(m_camoTextColor);
surface()->GetTextSize(m_hFont, unicodeValue_ThermOptic, fontWidth, fontHeight);
surface()->DrawSetTextPos(camonum_xpos + xpos - fontWidth, camonum_ypos + ypos);
surface()->DrawPrintText(unicodeValue_ThermOptic, valLen_ThermOptic);
surface()->DrawSetTextColor(m_sprintColor);
surface()->DrawSetTextColor(m_sprintTextColor);
surface()->GetTextSize(m_hFont, unicodeValue_Aux, fontWidth, fontHeight);
surface()->DrawSetTextPos(sprintnum_xpos + xpos - fontWidth, sprintnum_ypos + ypos);
surface()->DrawPrintText(unicodeValue_Aux, valLen_Aux);
Expand Down Expand Up @@ -200,21 +200,22 @@ void CNEOHud_HTA::DrawHTA() const
sprintbar_xpos + xpos + (sprintbar_w * (aux / 100.0)),
sprintbar_ypos + ypos + sprintbar_h);

surface()->DrawSetColor(textColorTransparent);
surface()->DrawSetColor(m_camoTextColor);
surface()->DrawOutlinedRect(
camobar_xpos + xpos,
camobar_ypos + ypos,
camobar_xpos + xpos + camobar_w,
camobar_ypos + ypos + camobar_h);

surface()->DrawSetColor(m_sprintTextColor);
surface()->DrawOutlinedRect(
sprintbar_xpos + xpos,
sprintbar_ypos + ypos,
sprintbar_xpos + xpos + sprintbar_w,
sprintbar_ypos + ypos + sprintbar_h);
}

surface()->DrawSetColor(textColorTransparent);
surface()->DrawSetColor(m_healthTextColor);
surface()->DrawOutlinedRect(
healthbar_xpos + xpos,
healthbar_ypos + ypos,
Expand Down
11 changes: 7 additions & 4 deletions mp/src/game/client/neo/ui/neo_hud_health_thermoptic_aux.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CNEOHud_HTA : public CNEOHud_ChildElement, public CHudElement, public vgui
CPanelAnimationVarAliasType(float, tall, "tall", "32", "proportional_float");
CPanelAnimationVarAliasType(float, visible, "visible", "1", "proportional_float");
CPanelAnimationVarAliasType(float, enabled, "enabled", "1", "proportional_float");
CPanelAnimationVar(Color, m_boxColor, "box_color", "100 100 100 178");
CPanelAnimationVar(Color, m_boxColor, "box_color", "200 200 200 40");

CPanelAnimationVarAliasType(bool, top_left_corner, "top_left_corner", "1", "bool");
CPanelAnimationVarAliasType(bool, top_right_corner, "top_right_corner", "1", "bool");
Expand All @@ -57,7 +57,8 @@ class CNEOHud_HTA : public CNEOHud_ChildElement, public CHudElement, public vgui
CPanelAnimationVarAliasType(float, healthbar_h, "healthbar_h", "6", "proportional_float");
CPanelAnimationVarAliasType(int, healthnum_xpos, "healthnum_xpos", "198", "proportional_xpos");
CPanelAnimationVarAliasType(int, healthnum_ypos, "healthnum_ypos", "2", "proportional_ypos");
CPanelAnimationVar(Color, m_healthColor, "health_color", "255 255 255 178");
CPanelAnimationVar(Color, m_healthTextColor, "health_text_color", "255 255 255 100");
CPanelAnimationVar(Color, m_healthColor, "health_color", "255 255 255 150");

CPanelAnimationVarAliasType(int, camotext_xpos, "camotext_xpos", "6", "proportional_xpos");
CPanelAnimationVarAliasType(int, camotext_ypos, "camotext_ypos", "12", "proportional_ypos");
Expand All @@ -67,7 +68,8 @@ class CNEOHud_HTA : public CNEOHud_ChildElement, public CHudElement, public vgui
CPanelAnimationVarAliasType(float, camobar_h, "camobar_h", "6", "proportional_float");
CPanelAnimationVarAliasType(int, camonum_xpos, "camonum_xpos", "198", "proportional_xpos");
CPanelAnimationVarAliasType(int, camonum_ypos, "camonum_ypos", "12", "proportional_ypos");
CPanelAnimationVar(Color, m_camoColor, "camo_color", "255 255 255 178");
CPanelAnimationVar(Color, m_camoTextColor, "camo_text_color", "255 255 255 100");
CPanelAnimationVar(Color, m_camoColor, "camo_color", "255 255 255 150");

CPanelAnimationVarAliasType(int, sprinttext_xpos, "sprinttext_xpos", "6", "proportional_xpos");
CPanelAnimationVarAliasType(int, sprinttext_ypos, "sprinttext_ypos", "22", "proportional_ypos");
Expand All @@ -77,7 +79,8 @@ class CNEOHud_HTA : public CNEOHud_ChildElement, public CHudElement, public vgui
CPanelAnimationVarAliasType(float, sprintbar_h, "sprintbar_h", "6", "proportional_float");
CPanelAnimationVarAliasType(int, sprintnum_xpos, "sprintnum_xpos", "198", "proportional_xpos");
CPanelAnimationVarAliasType(int, sprintnum_ypos, "sprintnum_ypos", "22", "proportional_ypos");
CPanelAnimationVar(Color, m_sprintColor, "sprint_color", "255 255 255 178");
CPanelAnimationVar(Color, m_sprintTextColor, "sprint_text_color", "255 255 255 100");
CPanelAnimationVar(Color, m_sprintColor, "sprint_color", "255 255 255 150");

private:
CNEOHud_HTA(const CNEOHud_HTA& other);
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/client/neo/ui/neo_hud_round_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class CNEOHud_RoundState : public CNEOHud_ChildElement, public CHudElement, publ

int m_iNextAvatarUpdate = 0;

CPanelAnimationVar(Color, box_color, "box_color", "100 100 100 178");
CPanelAnimationVar(Color, box_color, "box_color", "200 200 200 40");
CPanelAnimationVarAliasType(bool, health_monochrome, "health_monochrome", "1", "bool");

private:
Expand Down

0 comments on commit 9d04458

Please sign in to comment.