Merge pull request #7975 from ChillerDragon/pr_ed_wasd_speed

[editor] Increase WASD pan speed when holding down shift
This commit is contained in:
archimede67 2024-02-16 12:50:10 +00:00 committed by GitHub
commit aae674897a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3592,9 +3592,9 @@ void CEditor::DoMapEditor(CUIRect View)
UI()->SetActiveItem(nullptr);
}
}
if(!Input()->ShiftIsPressed() && !Input()->ModifierIsPressed() && m_Dialog == DIALOG_NONE && CLineInput::GetActiveInput() == nullptr)
if(!Input()->ModifierIsPressed() && m_Dialog == DIALOG_NONE && CLineInput::GetActiveInput() == nullptr)
{
float PanSpeed = 64.0f;
float PanSpeed = Input()->ShiftIsPressed() ? 200.0f : 64.0f;
if(Input()->KeyPress(KEY_A))
MapView()->OffsetWorld({-PanSpeed * m_MouseWScale, 0});
else if(Input()->KeyPress(KEY_D))