mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Hide scoreboard if statboard is present
This commit is contained in:
parent
d8d20b0c1a
commit
12652985c3
|
@ -2894,7 +2894,7 @@ void CClient::AutoScreenshot_Start()
|
|||
|
||||
void CClient::AutoStatScreenshot_Start()
|
||||
{
|
||||
if(g_Config.m_ClStatboardScreenshot)
|
||||
if(g_Config.m_ClAutoStatboardScreenshot)
|
||||
{
|
||||
Graphics()->TakeScreenshot("auto/stats/autoscreen");
|
||||
m_AutoStatScreenshotRecycle = true;
|
||||
|
@ -2919,11 +2919,11 @@ void CClient::AutoStatScreenshot_Cleanup()
|
|||
{
|
||||
if(m_AutoStatScreenshotRecycle)
|
||||
{
|
||||
if(g_Config.m_ClStatboardScreenshotMax)
|
||||
if(g_Config.m_ClAutoStatboardScreenshotMax)
|
||||
{
|
||||
// clean up auto taken screens
|
||||
CFileCollection AutoScreens;
|
||||
AutoScreens.Init(Storage(), "screenshots/auto/stats", "autoscreen", ".png", g_Config.m_ClStatboardScreenshotMax);
|
||||
AutoScreens.Init(Storage(), "screenshots/auto/stats", "autoscreen", ".png", g_Config.m_ClAutoStatboardScreenshotMax);
|
||||
}
|
||||
m_AutoStatScreenshotRecycle = false;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <game/client/render.h>
|
||||
#include <game/client/components/countryflags.h>
|
||||
#include <game/client/components/motd.h>
|
||||
#include <game/client/components/statboard.h>
|
||||
|
||||
#include "scoreboard.h"
|
||||
|
||||
|
@ -616,7 +617,10 @@ void CScoreboard::OnRender()
|
|||
|
||||
bool CScoreboard::Active()
|
||||
{
|
||||
// if we activly wanna look on the scoreboard
|
||||
// if statboard is active dont show scoreboard
|
||||
if(m_pClient->m_pStatboard->IsActive())
|
||||
return false;
|
||||
|
||||
if(m_Active)
|
||||
return true;
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ void CStatboard::OnMessage(int MsgType, void *pRawMsg)
|
|||
|
||||
void CStatboard::OnRender()
|
||||
{
|
||||
if(g_Config.m_ClStatboardScreenshot)
|
||||
if(g_Config.m_ClAutoStatboardScreenshot)
|
||||
{
|
||||
if(m_ScreenshotTime < 0 && m_pClient->m_Snap.m_pGameInfoObj && m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_GAMEOVER)
|
||||
m_ScreenshotTime = time_get() + time_freq() * 3;
|
||||
|
|
|
@ -69,8 +69,8 @@ MACRO_CONFIG_STR(ClDDNetMapServer, cl_ddnet_maps_server, 100, "maps.ddnet.tw", C
|
|||
MACRO_CONFIG_STR(ClLanguagefile, cl_languagefile, 255, "", CFGFLAG_CLIENT|CFGFLAG_SAVE, "What language file to use")
|
||||
MACRO_CONFIG_INT(ClShowNewSkins, cl_show_new_skins, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show new skins ingame")
|
||||
MACRO_CONFIG_INT(ClShowCustomSkins, cl_show_custom_skins, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show custom skins ingame")
|
||||
MACRO_CONFIG_INT(ClStatboardScreenshot, cl_statboard_screenshot, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Automatically take game over statboard screenshot")
|
||||
MACRO_CONFIG_INT(ClStatboardScreenshotMax, cl_statboard_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created statboard screenshots (0 = no limit)")
|
||||
MACRO_CONFIG_INT(ClAutoStatboardScreenshot, cl_auto_statboard_screenshot, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Automatically take game over statboard screenshot")
|
||||
MACRO_CONFIG_INT(ClAutoStatboardScreenshotMax, cl_auto_statboard_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created statboard screenshots (0 = no limit)")
|
||||
|
||||
MACRO_CONFIG_INT(ClDefaultZoom, cl_default_zoom, 10, 0, 20, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Default zoom level (10 default, min 0, max 20)")
|
||||
|
||||
|
|
Loading…
Reference in a new issue