diff options
| author | SushiTee <weichel.sascha@gmail.com> | 2010-07-11 02:06:13 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-07-17 20:05:17 +0200 |
| commit | b6d07edda83299f03acd8af1db470fbbf002499c (patch) | |
| tree | 026b7e10f01f2a727333717871f53187bbabbf77 /src/game/editor | |
| parent | 22c19f45dbb38b234e96279897ee96ec86832701 (diff) | |
| download | zcatch-b6d07edda83299f03acd8af1db470fbbf002499c.tar.gz zcatch-b6d07edda83299f03acd8af1db470fbbf002499c.zip | |
fixed issue #57
Diffstat (limited to 'src/game/editor')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index c951912d..468983f8 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -833,9 +833,9 @@ void CEditor::DoQuad(CQuad *q, int Index) float CenterX = fx2f(q->m_aPoints[4].x); float CenterY = fx2f(q->m_aPoints[4].y); - float dx = (CenterX - wx); - float dy = (CenterY - wy); - if(dx*dx+dy*dy < 10*10) + float dx = (CenterX - wx)/m_WorldZoom; + float dy = (CenterY - wy)/m_WorldZoom; + if(dx*dx+dy*dy < 50) UI()->SetHotItem(pId); // draw selection background @@ -939,7 +939,7 @@ void CEditor::DoQuad(CQuad *q, int Index) else Graphics()->SetColor(0,1,0,1); - IGraphics::CQuadItem QuadItem(CenterX, CenterY, 5.0f, 5.0f); + IGraphics::CQuadItem QuadItem(CenterX, CenterY, 5.0f*m_WorldZoom, 5.0f*m_WorldZoom); Graphics()->QuadsDraw(&QuadItem, 1); } @@ -953,9 +953,9 @@ void CEditor::DoQuadPoint(CQuad *q, int QuadIndex, int v) float px = fx2f(q->m_aPoints[v].x); float py = fx2f(q->m_aPoints[v].y); - float dx = (px - wx); - float dy = (py - wy); - if(dx*dx+dy*dy < 10*10) + float dx = (px - wx)/m_WorldZoom; + float dy = (py - wy)/m_WorldZoom; + if(dx*dx+dy*dy < 50) UI()->SetHotItem(pId); // draw selection background @@ -1084,7 +1084,7 @@ void CEditor::DoQuadPoint(CQuad *q, int QuadIndex, int v) else Graphics()->SetColor(1,0,0,1); - IGraphics::CQuadItem QuadItem(px, py, 5.0f, 5.0f); + IGraphics::CQuadItem QuadItem(px, py, 5.0f*m_WorldZoom, 5.0f*m_WorldZoom); Graphics()->QuadsDraw(&QuadItem, 1); } |