Change angle increment from 45 to 15 when holding SHIFT in scene editor

This commit is contained in:
Florian Rival
2015-09-04 19:40:34 +02:00
parent 487a4dd8cb
commit 7acdcaece6

View File

@@ -1089,7 +1089,7 @@ void LayoutEditorCanvas::OnMotion(wxMouseEvent &)
for ( auto & it : selectedInstances)
{
float newAngle = atan2(sf::Mouse::getPosition(*this).y-angleButtonCenter.y, sf::Mouse::getPosition(*this).x-angleButtonCenter.x)*180/3.14159;
if (shiftPressed) newAngle = gd::Round(newAngle / 45.0) * 45.0;
if (shiftPressed) newAngle = gd::Round(newAngle / 15.0) * 15.0;
it.first->SetAngle(newAngle);
}