Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/game/client/neo/ui/neo_root_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ void NeoSettingsRestore(NeoSettings *ns, const NeoSettings::Keys::Flags flagsKey
pGeneral->bAutoDetectOBS = cvr->cl_neo_streamermode_autodetect_obs.GetBool();
pGeneral->bTachiFullAutoPreferred = cvr->cl_neo_tachi_prefer_auto.GetBool();
pGeneral->bTakingDamageSounds = cvr->cl_neo_taking_damage_sounds.GetBool();
pGeneral->iScoreboardPadding = cvr->cl_neo_hud_scoreboard_padding.GetInt();
pGeneral->iBackground = clamp(cvr->sv_unlockedchapters.GetInt(), 0, ns->iCBListSize - 1);
NeoSettingsBackgroundWrite(ns);
NeoUI::ResetTextures();
Expand Down Expand Up @@ -691,6 +690,7 @@ void NeoSettingsRestore(NeoSettings *ns, const NeoSettings::Keys::Flags flagsKey
pHUD->bEnableRangeFinder = cvr->cl_neo_hud_rangefinder_enabled.GetBool();
pHUD->iExtendedKillfeed = cvr->cl_neo_hud_extended_killfeed.GetInt();
pHUD->iKdinfoToggletype = cvr->cl_neo_kdinfo_toggletype.GetInt();
pHUD->iScoreboardPadding = cvr->cl_neo_hud_scoreboard_padding.GetInt();
pHUD->bShowHudContextHints = cvr->cl_neo_hud_context_hint_enabled.GetBool();
pHUD->bShowHudContextHintPlayerTakeover = cvr->cl_neo_hud_context_hint_show_player_takeover_hint.GetBool();
pHUD->bShowHudContextHintObjectInteract = cvr->cl_neo_hud_context_hint_show_object_interact_hint.GetBool();
Expand Down Expand Up @@ -803,7 +803,6 @@ void NeoSettingsSave(const NeoSettings *ns)
cvr->cl_neo_tachi_prefer_auto.SetValue(pGeneral->bTachiFullAutoPreferred);
cvr->sv_unlockedchapters.SetValue(pGeneral->iBackground);
cvr->cl_neo_taking_damage_sounds.SetValue(pGeneral->bTakingDamageSounds);
cvr->cl_neo_hud_scoreboard_padding.SetValue(pGeneral->iScoreboardPadding);
NeoSettingsBackgroundWrite(ns);
}
{
Expand Down Expand Up @@ -959,6 +958,7 @@ void NeoSettingsSave(const NeoSettings *ns)
cvr->cl_neo_hud_rangefinder_enabled.SetValue(pHUD->bEnableRangeFinder);
cvr->cl_neo_hud_extended_killfeed.SetValue(pHUD->iExtendedKillfeed);
cvr->cl_neo_kdinfo_toggletype.SetValue(pHUD->iKdinfoToggletype);
cvr->cl_neo_hud_scoreboard_padding.SetValue(pHUD->iScoreboardPadding);
cvr->cl_neo_hud_context_hint_enabled.SetValue(pHUD->bShowHudContextHints);
cvr->cl_neo_hud_context_hint_show_player_takeover_hint.SetValue(pHUD->bShowHudContextHintPlayerTakeover);
cvr->cl_neo_hud_context_hint_show_object_interact_hint.SetValue(pHUD->bShowHudContextHintObjectInteract);
Expand Down Expand Up @@ -1108,12 +1108,6 @@ FORCEINLINE void VarTrimmer(wchar_t (&input)[maxlen])
}
}

static const wchar_t *NEOSCOREBOARDPADDING_LABELS[NEOSCOREBOARDPADDING__TOTAL] = {
L"Default", // NEOSCOREBOARDPADDING_DEFAULT
L"Compact", // NEOSCOREBOARDPADDING_COMPACT
L"Spacious", // NEOSCOREBOARDPADDING_SPACIOUS
};

void NeoSettings_General(NeoSettings *ns)
{
NeoSettings::General *pGeneral = &ns->general;
Expand All @@ -1125,7 +1119,6 @@ void NeoSettings_General(NeoSettings *ns)
NeoUI::RingBox(L"Utility slot equip priority", EQUIP_UTILITY_PRIORITY_LABELS, NeoSettings::EquipUtilityPriorityType::EQUIP_UTILITY_PRIORITY__TOTAL, &pGeneral->iEquipUtilityPriority);
NeoUI::RingBoxBool(L"Weapon fastswitch", &pGeneral->bWeaponFastSwitch);
NeoUI::RingBoxBool(L"Taking damage sounds", &pGeneral->bTakingDamageSounds);
NeoUI::RingBox(L"Scoreboard padding", NEOSCOREBOARDPADDING_LABELS, NEOSCOREBOARDPADDING__TOTAL, &pGeneral->iScoreboardPadding);

NeoUI::Divider(L"MAIN MENU");
NeoUI::RingBox(L"Selected Background", const_cast<const wchar_t **>(ns->p2WszCBList), ns->iCBListSize, &pGeneral->iBackground);
Expand Down Expand Up @@ -1673,6 +1666,12 @@ static const wchar_t *EXT_KILLFEED_LABELS[] = {
L"Objectives & rank-ups"
};

static const wchar_t *NEOSCOREBOARDPADDING_LABELS[NEOSCOREBOARDPADDING__TOTAL] = {
L"Default", // NEOSCOREBOARDPADDING_DEFAULT
L"Compact", // NEOSCOREBOARDPADDING_COMPACT
L"Spacious", // NEOSCOREBOARDPADDING_SPACIOUS
};

void NeoSettings_HUD(NeoSettings *ns)
{
NeoSettings::HUD *pHud = &ns->hud;
Expand All @@ -1686,6 +1685,7 @@ void NeoSettings_HUD(NeoSettings *ns)
NeoUI::RingBoxBool(L"Show rangefinder", &pHud->bEnableRangeFinder);
NeoUI::RingBox(L"Extended killfeed", EXT_KILLFEED_LABELS, ARRAYSIZE(EXT_KILLFEED_LABELS), &pHud->iExtendedKillfeed);
NeoUI::RingBox(L"Killer damage info auto show", KDMGINFO_TOGGLETYPE_LABELS, KDMGINFO_TOGGLETYPE__TOTAL, &pHud->iKdinfoToggletype);
NeoUI::RingBox(L"Scoreboard padding", NEOSCOREBOARDPADDING_LABELS, NEOSCOREBOARDPADDING__TOTAL, &pHud->iScoreboardPadding);

NeoUI::Divider(L"Contextual hints");
NeoUI::RingBoxBool(L"Show HUD contextual hints", &pHud->bShowHudContextHints);
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/neo/ui/neo_root_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ struct NeoSettings
bool bTachiFullAutoPreferred;
int iBackground;
bool bTakingDamageSounds;
int iScoreboardPadding;
};

struct Keys
Expand Down Expand Up @@ -213,6 +212,7 @@ struct NeoSettings
bool bShowHudContextHighlightObject;
bool bShowHudContextHighlightPlayer;
int iKdinfoToggletype;
int iScoreboardPadding;

// IFF Markers
int optionChosen;
Expand Down
10 changes: 5 additions & 5 deletions src/game/client/neo/ui/neo_scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode)
const int iPopupCardPerRowTallAvatarName = iPopupCardRowTallBase * 3;
const int iPopupCardPerRowTallButtons = iPopupCardRowTallBase * 2.25f;
const int iAvatarOffset = m_uiCtx.iMarginX;
const int iAvatarWT = iPopupCardPerRowTallAvatarName - (iAvatarOffset * 2);
const int iAvatarWT = ShowAvatars() ? (iPopupCardPerRowTallAvatarName - (iAvatarOffset * 2)) : 0;
const bool bShowReadyUp = sv_neo_readyup_lobby.GetBool()
&& NEORules()->m_nRoundStatus == NeoRoundStatus::Idle;
static CrosshairInfo staticXhairInfo = {};
Expand Down Expand Up @@ -820,7 +820,7 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode)
const bool bHaveFriendReq = (SteamFriends()
&& k_EFriendRelationshipRequestInitiator == SteamFriends()->GetFriendRelationship(m_playerPopup.steamID));

const int iWidePopupCover = iAvatarWT + (2 * iAvatarOffset)
const int iWidePopupCover = iAvatarWT + ((1 + ShowAvatars()) * iAvatarOffset)
+ NeoUI::SuitableWideByWStr(
m_playerPopup.wszName,
NeoUI::SUITABLEWIDE_TABLE,
Expand Down Expand Up @@ -989,7 +989,7 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode)
if (NeoUI::BeginPopup(NEOSCOREBOARDPOPUP_CARD))
{
CAvatarImage *pAvatarImg = nullptr;
if (m_playerPopup.avatar.i184Idx >= 0)
if (ShowAvatars() && m_playerPopup.avatar.i184Idx >= 0)
{
pAvatarImg = (CAvatarImage *)(m_pImageList->GetImage(m_playerPopup.avatar.i184Idx));
}
Expand All @@ -1006,7 +1006,7 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode)
NeoUI::Pad();

vgui::surface()->DrawSetTextPos(
m_uiCtx.dPanel.x + iAvatarOffset + iAvatarWT + iAvatarOffset,
m_uiCtx.dPanel.x + iAvatarOffset + (pAvatarImg ? (iAvatarWT + iAvatarOffset) : 0),
m_uiCtx.dPanel.y + iAvatarOffset);
if (m_playerPopup.wszClantag[0])
{
Expand All @@ -1017,7 +1017,7 @@ void CNEOScoreBoard::OnMainLoop(const NeoUI::Mode eMode)
const auto *pFontI = &m_uiCtx.fonts[m_uiCtx.eFont];
const int iClantagTall = vgui::surface()->GetFontTall(pFontI->hdl);
vgui::surface()->DrawSetTextPos(
m_uiCtx.dPanel.x + iAvatarOffset + iAvatarWT + iAvatarOffset,
m_uiCtx.dPanel.x + iAvatarOffset + (pAvatarImg ? (iAvatarWT + iAvatarOffset) : 0),
m_uiCtx.dPanel.y + iAvatarOffset + iClantagTall + iAvatarOffset);
}
NeoUI::SwapFont(NeoUI::FONT_NTLARGE);
Expand Down