mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
More HUD control
This commit is contained in:
parent
3ed74bc730
commit
a90b37544a
|
@ -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(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);
|
RenderHealthAndAmmo(m_pClient->m_Snap.m_pLocalCharacter);
|
||||||
RenderDDRaceEffects();
|
RenderDDRaceEffects();
|
||||||
}
|
}
|
||||||
else if(m_pClient->m_Snap.m_SpecInfo.m_Active)
|
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);
|
RenderHealthAndAmmo(&m_pClient->m_Snap.m_aCharacters[m_pClient->m_Snap.m_SpecInfo.m_SpectatorID].m_Cur);
|
||||||
RenderSpectatorHud();
|
RenderSpectatorHud();
|
||||||
}
|
}
|
||||||
|
@ -481,6 +482,7 @@ void CHud::OnRender()
|
||||||
RenderGameTimer();
|
RenderGameTimer();
|
||||||
RenderPauseNotification();
|
RenderPauseNotification();
|
||||||
RenderSuddenDeath();
|
RenderSuddenDeath();
|
||||||
|
if (g_Config.m_ClShowhudScore)
|
||||||
RenderScoreHud();
|
RenderScoreHud();
|
||||||
RenderWarmupTimer();
|
RenderWarmupTimer();
|
||||||
RenderFps();
|
RenderFps();
|
||||||
|
|
|
@ -1100,6 +1100,18 @@ void CMenus::RenderSettingsDDRace(CUIRect MainView)
|
||||||
g_Config.m_ClAntiPingGrenade ^= 1;
|
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 aRects[2];
|
||||||
CUIRect Label;
|
CUIRect Label;
|
||||||
MainView.HSplitTop(5.0f, 0, &MainView);
|
MainView.HSplitTop(5.0f, 0, &MainView);
|
||||||
|
|
|
@ -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(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(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(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")
|
MACRO_CONFIG_INT(ClShowfps, cl_showfps, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame FPS counter")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue