3469: Make dragging quads in the editor more sensitive to small mouse deltas r=def- a=timakro

Closes #963

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Tim Schumacher <tim@timakro.de>
This commit is contained in:
bors[bot] 2021-01-02 15:11:22 +00:00 committed by GitHub
commit 6f14d4e612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1496,7 +1496,7 @@ void CEditor::DoSoundSource(CSoundSource *pSource, int Index)
if(UI()->ActiveItem() == pID) if(UI()->ActiveItem() == pID)
{ {
if(m_MouseDeltaWx * m_MouseDeltaWx + m_MouseDeltaWy * m_MouseDeltaWy > 0.05f) if(m_MouseDeltaWx * m_MouseDeltaWx + m_MouseDeltaWy * m_MouseDeltaWy > 0.0f)
{ {
if(s_Operation == OP_MOVE) if(s_Operation == OP_MOVE)
{ {
@ -1635,7 +1635,7 @@ void CEditor::DoQuad(CQuad *q, int Index)
if(UI()->ActiveItem() == pID) if(UI()->ActiveItem() == pID)
{ {
if(m_MouseDeltaWx * m_MouseDeltaWx + m_MouseDeltaWy * m_MouseDeltaWy > 0.05f) if(m_MouseDeltaWx * m_MouseDeltaWx + m_MouseDeltaWy * m_MouseDeltaWy > 0.0f)
{ {
// check if we only should move pivot // check if we only should move pivot
if(s_Operation == OP_MOVE_PIVOT) if(s_Operation == OP_MOVE_PIVOT)
@ -1901,7 +1901,7 @@ void CEditor::DoQuadPoint(CQuad *pQuad, int QuadIndex, int V)
{ {
if(!s_Moved) if(!s_Moved)
{ {
if(m_MouseDeltaWx * m_MouseDeltaWx + m_MouseDeltaWy * m_MouseDeltaWy > 0.05f) if(m_MouseDeltaWx * m_MouseDeltaWx + m_MouseDeltaWy * m_MouseDeltaWy > 0.0f)
s_Moved = true; s_Moved = true;
} }