Exemplo n.º 1
0
//=============================================================================================
// Method Name:   OnLButtonUp
// Purpose:       Process the left-button down message.
// Params:        (Standard event processor arguments.)
// Returns:       (Standard event processor returns.)
//
void CRepeatButton::OnLButtonUp( UINT nFlags, CPoint point )
{
    ASSERT_VALID(this);

    RepeatButton_BASE::OnLButtonUp(nFlags, point);

    EndTracking();
    return;
}
Exemplo n.º 2
0
//===============================================================================================
// FUNCTION: OnMouseMove
// PURPOSE:  Processes the mouse move message.
//
void CRepeatButton::OnMouseMove(UINT nFlags, CPoint point)
{
    ASSERT_VALID(this);

    // Make sure the user still has the mouse button down
    if ( !IsButtonDown() )
        EndTracking();

    // Don't call base class so that repeat continues even if finger is off button.
    return;
}
void CESTrackFunctions::OnTimer(int Counter)
{
	if (!ControllerMyself().IsValid() || !ControllerMyself().IsController())
		return;
	if (GetConnectionType() != EuroScopePlugIn::CONNECTION_TYPE_DIRECT)
		return;
	if (autoDrop)
	{
		for (auto flightplan = FlightPlanSelectFirst();
			flightplan.IsValid();
			flightplan = FlightPlanSelectNext(flightplan))
		{
			if (flightplan.GetSimulated()) continue;
			if (CheckDrop(flightplan))
				flightplan.EndTracking();
		}
	}
}
bool FEdModeTexture::StartTracking(FEditorViewportClient* InViewportClient, FViewport* InViewport)
{
	// call base version because it calls the StartModify() virtual method needed to track drag events
	bool BaseRtn = FEdMode::StartTracking(InViewportClient, InViewport);

	// Complete the previous transaction if one exists
	if( ScopedTransaction )
	{
		EndTracking(InViewportClient, InViewport);
	}
	// Start a new transaction
	ScopedTransaction = new FScopedTransaction( NSLOCTEXT("UnrealEd", "TextureManipulation", "Texture Manipulation") );

	for( FConstLevelIterator Iterator = GetWorld()->GetLevelIterator(); Iterator; ++Iterator )
	{
		UModel* Model = (*Iterator)->Model;
		Model->ModifySelectedSurfs( true );
	}

	return BaseRtn;
}
Exemplo n.º 5
0
//===============================================================================================
// FUNCTION: OnTimer
// PURPOSE:  Called on each timer tick.
//
void CRepeatButton::OnTimer( UINT nIDEvent )
{
    ASSERT_VALID(this);

    if( nIDEvent==c_nTimerID )
    {
        // Make sure the user still has the mouse button down
        if ( !IsButtonDown() )
        {
            EndTracking();
            return;
        }

        UINT uTickCount = GetTickCount() - m_uStartTickCount;

        // If not time for next message return FALSE.
        if (uTickCount < m_uNextMsg)
            return;

        // If we have passed the threshold for accelerating the repetition rate, boost the delta.
        if (uTickCount > c_uSlowFastThreshold)
            m_uMsgDelta = c_uFastMsgPeriod;

        // Step the "next message" count on until it is in the future...
        while (m_uNextMsg < uTickCount)
            m_uNextMsg += m_uMsgDelta;

        // send a command out to the parent.
        SendCommand();

        return;
    }

    // Unhandled timer events.
    CWnd::OnTimer(nIDEvent);
}