Fix inconsistent slow mouse in editor

The mouse slow flag must be reset at the beginning of the render function in the editor instead of at the beginning of the update function, as it otherwise only works very inconsistently.
This commit is contained in:
Robert Müller 2023-03-18 22:06:14 +01:00
parent 484df7fc79
commit c5f2727a3f

View file

@ -6871,7 +6871,6 @@ void CEditor::OnUpdate()
IInput::ECursorType CursorType = Input()->CursorRelative(&MouseRelX, &MouseRelY);
if(CursorType != IInput::CURSOR_NONE)
UI()->ConvertMouseMove(&MouseRelX, &MouseRelY, CursorType);
UI()->ResetMouseSlow();
m_MouseDeltaX += MouseRelX;
m_MouseDeltaY += MouseRelY;
@ -6913,6 +6912,8 @@ void CEditor::OnUpdate()
void CEditor::OnRender()
{
UI()->ResetMouseSlow();
// toggle gui
if(m_Dialog == DIALOG_NONE && m_EditBoxActive == 0 && Input()->KeyPress(KEY_TAB))
m_GuiActive = !m_GuiActive;