Exemplo n.º 1
0
void CreateTool::MouseUp( const MouseButtonInput& e )
{
	if ( !e.MiddleDown() && m_PaintTimer.IsAlive() )
	{
		m_PaintTimer.Stop();
	}

	Base::MouseUp(e);
}
Exemplo n.º 2
0
bool TransformManipulator::MouseDown( const MouseButtonInput& e )
{
    if (e.LeftDown())
        m_Left = true;

    if (e.MiddleDown())
        m_Middle = true;

    if (e.RightDown())
        m_Right = true;

    m_StartX = e.GetPosition().x;
    m_StartY = e.GetPosition().y;

    m_Manipulated = false;
    m_Manipulating = true;

    return true;
}
Exemplo n.º 3
0
bool CreateTool::MouseDown( const MouseButtonInput& e )
{
	if ( e.MiddleDown() )
	{
		Vector3 translation;
		Vector3 normal;

		{
			HELIUM_EDITOR_SCENE_SCOPE_TIMER( "Pick Location For Instance" );
			DetermineTranslationAndNormal( e.GetPosition().x, e.GetPosition().y, translation, normal );
		}

		CreateSingleObject( translation, normal );

		if ( s_PaintMode )
		{
			m_InstanceUpdateOffsets = true;
			CalculateInstanceRadiusAndBounds( m_InstanceRadius, m_InstanceBounds );
			if ( e.ShiftIsDown() )
			{
				CreateMultipleObjects( true );
			}
			if ( !m_PaintTimer.IsAlive() )
			{
				m_PaintTimer.Start();
			}
		}

		{
			HELIUM_EDITOR_SCENE_SCOPE_TIMER( "Execute Scene" );

			m_Scene->Execute(true);
		}
	}

	return Base::MouseDown( e );
}