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