mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Merge #3469
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:
commit
6f14d4e612
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue