mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
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:
parent
484df7fc79
commit
c5f2727a3f
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue