Added an option to turn it on/off

This commit is contained in:
LordSk 2018-11-23 19:17:39 +01:00
parent c19c60012c
commit 8f14070996
3 changed files with 11 additions and 0 deletions

View file

@ -953,6 +953,12 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
if(DoButton_CheckBox(&s_Showsocial, Localize("Show social"), g_Config.m_ClShowsocial, &Button))
g_Config.m_ClShowsocial ^= 1;
GameRight.HSplitTop(Spacing, 0, &GameRight);
GameRight.HSplitTop(ButtonHeight, &Button, &GameRight);
static int s_ShowUserId = 0;
if(DoButton_CheckBox(&s_ShowUserId, Localize("Show user IDs"), g_Config.m_ClShowUserId, &Button))
g_Config.m_ClShowUserId ^= 1;
// show chat messages button
if(g_Config.m_ClShowsocial)
{

View file

@ -598,6 +598,8 @@ void CRenderTools::RenderTilemapGenerateSkip(class CLayers *pLayers)
void CRenderTools::DrawClientID(ITextRender* pTextRender, CTextCursor* pCursor, int ID,
const vec4& BgColor, const vec4& TextColor)
{
if(!g_Config.m_ClShowUserId) return;
char aBuff[4];
str_format(aBuff, sizeof(aBuff), "%2d ", ID);
@ -627,5 +629,6 @@ void CRenderTools::DrawClientID(ITextRender* pTextRender, CTextCursor* pCursor,
float CRenderTools::GetClientIdRectSize(float FontSize)
{
if(!g_Config.m_ClShowUserId) return 0;
return 1.4f * FontSize + 0.2f * FontSize;
}

View file

@ -31,6 +31,8 @@ MACRO_CONFIG_INT(ClMouseMaxDistanceStatic, cl_mouse_max_distance_static, 400, 0,
MACRO_CONFIG_INT(ClCustomizeSkin, cl_customize_skin, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
MACRO_CONFIG_INT(ClShowUserId, cl_show_user_id, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
MACRO_CONFIG_INT(EdZoomTarget, ed_zoom_target, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Zoom to the current mouse target")
MACRO_CONFIG_INT(EdShowkeys, ed_showkeys, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
MACRO_CONFIG_INT(EdColorGridInner, ed_color_grid_inner, 0xFFFFFF26, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")