Improve some chat settings

This commit is contained in:
def 2020-12-27 01:14:34 +01:00
parent 896881079f
commit 89e2371b9b

View file

@ -1750,7 +1750,6 @@ void CMenus::RenderSettingsHUD(CUIRect MainView)
UI()->DoLabelScaled(&Section, Localize("Preview"), 20.0f, -1);
Chat.HSplitTop(10.0f, 0x0, &Chat);
Chat.VSplitRight(100.0f, &Chat, 0x0);
RenderTools()->DrawUIRect(&Chat, ColorRGBA(1, 1, 1, 0.1f), CUI::CORNER_ALL, 8.0f);
Chat.HSplitTop(10.0f, 0x0, &Chat);
@ -1808,11 +1807,7 @@ void CMenus::RenderSettingsHUD(CUIRect MainView)
TempY += RealOffsetY;
}
if(g_Config.m_ClShowIDs)
str_copy(LineBuilder, " 7: Evgesha: Hey, how are you ", sizeof(LineBuilder));
else
str_copy(LineBuilder, "Evgesha: Hey, how are you ", sizeof(LineBuilder));
str_append(LineBuilder, aBuf, sizeof(LineBuilder));
str_format(LineBuilder, sizeof(LineBuilder), "%snameless tee: Hey, how are you %s?", g_Config.m_ClShowIDs ? " 7: " : "", aBuf);
Width = TextRender()->TextWidth(0, RealFontSize, LineBuilder, -1, -1);
RenderTools()->DrawRoundRectExt(X - RealMsgPaddingX / 2.0f, TempY - RealMsgPaddingY / 2.0f, Width + RealMsgPaddingX + RealMsgPaddingTee, RealFontSize + RealMsgPaddingY, RealBackgroundRounding, CUI::CORNER_ALL);
TempY += RealOffsetY;
@ -1860,7 +1855,7 @@ void CMenus::RenderSettingsHUD(CUIRect MainView)
int i = 0;
RenderInfo[i++].m_OriginalRenderSkin = GameClient()->m_pSkins->Get(DefaultInd)->m_OriginalSkin;
RenderInfo[i++].m_OriginalRenderSkin = (ind = GameClient()->m_pSkins->Find("planet_uranus")) != -1 ? GameClient()->m_pSkins->Get(ind)->m_OriginalSkin : RenderInfo[0].m_OriginalRenderSkin;
RenderInfo[i++].m_OriginalRenderSkin = (ind = GameClient()->m_pSkins->Find("pinky")) != -1 ? GameClient()->m_pSkins->Get(ind)->m_OriginalSkin : RenderInfo[0].m_OriginalRenderSkin;
RenderInfo[i++].m_OriginalRenderSkin = (ind = GameClient()->m_pSkins->Find("cammostripes")) != -1 ? GameClient()->m_pSkins->Get(ind)->m_OriginalSkin : RenderInfo[0].m_OriginalRenderSkin;
RenderInfo[i++].m_OriginalRenderSkin = (ind = GameClient()->m_pSkins->Find("beast")) != -1 ? GameClient()->m_pSkins->Get(ind)->m_OriginalSkin : RenderInfo[0].m_OriginalRenderSkin;
}
@ -1879,12 +1874,12 @@ void CMenus::RenderSettingsHUD(CUIRect MainView)
TextRender()->MoveCursor(&Cursor, RealMsgPaddingTee, 0);
TextRender()->TextColor(DefaultNameColor);
if(g_Config.m_ClShowIDs)
TextRender()->TextEx(&Cursor, " 7: Evgesha: ", -1);
else
TextRender()->TextEx(&Cursor, "Evgesha: ", -1);
TextRender()->TextEx(&Cursor, " 7: ", -1);
TextRender()->TextEx(&Cursor, "nameless tee: ", -1);
TextRender()->TextColor(HighlightedColor);
TextRender()->TextEx(&Cursor, "Hey, how are you ", -1);
TextRender()->TextEx(&Cursor, aBuf, -1);
TextRender()->TextEx(&Cursor, "?", -1);
if(!g_Config.m_ClChatOld)
RenderTools()->RenderTee(pIdleState, &RenderInfo[1], EMOTE_NORMAL, vec2(1, 0.1f), vec2(X + RealTeeSizeHalved, Y + OffsetTeeY + FullHeightMinusTee / 2.0f + TWSkinUnreliableOffset));
TextRender()->SetCursorPosition(&Cursor, X, Y += RealOffsetY);