mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix chat scoreboard collision for 16:9 and disable scoreboard checks for lower aspect ratios
This commit is contained in:
parent
17895d701a
commit
5f7e8a7901
|
@ -893,7 +893,9 @@ void CChat::OnPrepareLines()
|
|||
float y = 300.0f - 28.0f;
|
||||
float FontSize = FONT_SIZE;
|
||||
|
||||
bool IsScoreBoardOpen = m_pClient->m_pScoreboard->Active();
|
||||
float ScreenRatio = Graphics()->ScreenAspect();
|
||||
|
||||
bool IsScoreBoardOpen = m_pClient->m_pScoreboard->Active() && (ScreenRatio > 1.7f); // only assume scoreboard when screen ratio is widescreen(something around 16:9)
|
||||
|
||||
bool ForceRecreate = IsScoreBoardOpen != m_PrevScoreBoardShowed;
|
||||
bool ShowLargeArea = m_Show || g_Config.m_ClShowChat == 2;
|
||||
|
@ -917,7 +919,7 @@ void CChat::OnPrepareLines()
|
|||
RealMsgPaddingTee = 0;
|
||||
|
||||
int64 Now = time();
|
||||
float LineWidth = (IsScoreBoardOpen ? 90.0f : 200.0f) - RealMsgPaddingX - RealMsgPaddingTee;
|
||||
float LineWidth = (IsScoreBoardOpen ? 85.0f : 200.0f) - (RealMsgPaddingX * 1.5f) - RealMsgPaddingTee;
|
||||
|
||||
float HeightLimit = IsScoreBoardOpen ? 180.0f : m_PrevShowChat ? 50.0f : 200.0f;
|
||||
float Begin = x;
|
||||
|
@ -1230,9 +1232,12 @@ void CChat::OnRender()
|
|||
|
||||
OnPrepareLines();
|
||||
|
||||
float ScreenRatio = Graphics()->ScreenAspect();
|
||||
bool IsScoreBoardOpen = m_pClient->m_pScoreboard->Active() && (ScreenRatio > 1.7f); // only assume scoreboard when screen ratio is widescreen(something around 16:9)
|
||||
|
||||
int64 Now = time();
|
||||
float HeightLimit = m_pClient->m_pScoreboard->Active() ? 180.0f : m_PrevShowChat ? 50.0f : 200.0f;
|
||||
int OffsetType = m_pClient->m_pScoreboard->Active() ? 1 : 0;
|
||||
float HeightLimit = IsScoreBoardOpen ? 180.0f : m_PrevShowChat ? 50.0f : 200.0f;
|
||||
int OffsetType = IsScoreBoardOpen ? 1 : 0;
|
||||
|
||||
float RealMsgPaddingX = MESSAGE_PADDING_X;
|
||||
float RealMsgPaddingY = MESSAGE_PADDING_Y;
|
||||
|
|
Loading…
Reference in a new issue