1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Chat console: Prevent input loss on double open

This commit is contained in:
SmallJoker 2024-04-30 20:14:20 +02:00 committed by sfan5
parent c352fbf5c9
commit f0bb5313d3
2 changed files with 8 additions and 4 deletions

View file

@ -106,9 +106,13 @@ GUIChatConsole::~GUIChatConsole()
void GUIChatConsole::openConsole(f32 scale)
{
if (m_open)
return;
assert(scale > 0.0f && scale <= 1.0f);
m_open = true;
m_desired_height_fraction = scale;
m_desired_height = scale * m_screensize.Y;
reformatConsole();