Fix tab and F10 keys working inconsistently in editor

By moving the calls to `KeyPress` from `CEditor::OnUpdate` to `OnRender`.
This commit is contained in:
Robert Müller 2022-07-30 13:31:00 +02:00
parent 192c7b2bb0
commit 7f1a7795ee

View file

@ -6412,17 +6412,17 @@ void CEditor::OnUpdate()
m_MouseWorldY = 0.0f;
}
}
}
void CEditor::OnRender()
{
// toggle gui
if(Input()->KeyPress(KEY_TAB))
m_GuiActive = !m_GuiActive;
if(Input()->KeyPress(KEY_F10))
m_ShowMousePointer = false;
}
void CEditor::OnRender()
{
if(m_Animate)
m_AnimateTime = (time_get() - m_AnimateStart) / (float)time_freq();
else