More HUD control

This commit is contained in:
def 2013-11-02 03:09:56 +01:00
parent 3ed74bc730
commit a90b37544a
3 changed files with 19 additions and 3 deletions

View file

@ -468,12 +468,13 @@ void CHud::OnRender()
{
if(m_pClient->m_Snap.m_pLocalCharacter && !(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_GAMEOVER))
{
if (g_Config.m_ClShowhudHealthAmmo)
RenderHealthAndAmmo(m_pClient->m_Snap.m_pLocalCharacter);
RenderDDRaceEffects();
}
else if(m_pClient->m_Snap.m_SpecInfo.m_Active)
{
if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW)
if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW && g_Config.m_ClShowhudHealthAmmo)
RenderHealthAndAmmo(&m_pClient->m_Snap.m_aCharacters[m_pClient->m_Snap.m_SpecInfo.m_SpectatorID].m_Cur);
RenderSpectatorHud();
}
@ -481,6 +482,7 @@ void CHud::OnRender()
RenderGameTimer();
RenderPauseNotification();
RenderSuddenDeath();
if (g_Config.m_ClShowhudScore)
RenderScoreHud();
RenderWarmupTimer();
RenderFps();

View file

@ -1100,6 +1100,18 @@ void CMenus::RenderSettingsDDRace(CUIRect MainView)
g_Config.m_ClAntiPingGrenade ^= 1;
}
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_ClShowhudScore, Localize("HUD: Show score"), g_Config.m_ClShowhudScore, &Button))
{
g_Config.m_ClShowhudScore ^= 1;
}
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_ClShowhudHealthAmmo, Localize("HUD: Show health + ammo"), g_Config.m_ClShowhudHealthAmmo, &Button))
{
g_Config.m_ClShowhudHealthAmmo ^= 1;
}
CUIRect aRects[2];
CUIRect Label;
MainView.HSplitTop(5.0f, 0, &MainView);

View file

@ -16,6 +16,8 @@ MACRO_CONFIG_INT(ClNameplatesSize, cl_nameplates_size, 50, 0, 100, CFGFLAG_CLIEN
MACRO_CONFIG_INT(ClAutoswitchWeapons, cl_autoswitch_weapons, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Auto switch weapon on pickup")
MACRO_CONFIG_INT(ClShowhud, cl_showhud, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame HUD")
MACRO_CONFIG_INT(ClShowhudHealthAmmo, cl_showhud_healthammo, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame HUD (Health + Ammo)")
MACRO_CONFIG_INT(ClShowhudScore, cl_showhud_score, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame HUD (Score)")
MACRO_CONFIG_INT(ClShowChatFriends, cl_show_chat_friends, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show only chat messages from friends")
MACRO_CONFIG_INT(ClShowfps, cl_showfps, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame FPS counter")