Ejemplo n.º 1
0
void    pfGUIButtonMod::HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers )
{

    // make sure that we got the down click first
    if ( !fClicking )
        return;

    fClicking = false;
    if( fAnimationKeys.GetCount() > 0 )
    {
        plAnimCmdMsg *msg = new plAnimCmdMsg();
        msg->SetCmd( plAnimCmdMsg::kContinue );
        msg->SetCmd( plAnimCmdMsg::kSetBackwards );
        msg->SetCmd( plAnimCmdMsg::kGoToEnd );  
        msg->SetAnimName( fAnimName );
        msg->AddReceivers( fAnimationKeys );
        plgDispatch::MsgSend( msg );
    }

    IPlaySound( kMouseUp );

    // Don't run the command if the mouse is outside our bounds
    if( !fBounds.IsInside( &mousePt ) && fNotifyType != kNotifyOnUpAndDown )
        return;     

    if ( fNotifyType == kNotifyOnUp || fNotifyType == kNotifyOnUpAndDown)
        fTriggering = true;
    DoSomething();
    fTriggering = false;
}
Ejemplo n.º 2
0
void    pfGUIButtonMod::SetInteresting( bool i )
{
    pfGUIControlMod::SetInteresting( i );

    if( fMouseOverAnimKeys.GetCount() )
    {
        plAnimCmdMsg *msg = new plAnimCmdMsg();
        msg->SetCmd( plAnimCmdMsg::kContinue );
        msg->SetCmd( fInteresting ? plAnimCmdMsg::kSetForewards : plAnimCmdMsg::kSetBackwards );
        msg->SetAnimName( fMouseOverAnimName );
        msg->AddReceivers( fMouseOverAnimKeys );
        plgDispatch::MsgSend( msg );
    }

    if( i )
        IPlaySound( kMouseOver );
    else
        IPlaySound( kMouseOff );
}
Ejemplo n.º 3
0
void pfMarkerInfo::Update(double curTime)
{
    if (fLastChange != 0 && (curTime - fLastChange) > kFreezeLen)
    {
        fLastChange = 0;
        IPlayBounce(false);
    }

    if (fIsNew)
    {
        IPlaySound(true);
        fIsNew = false;
    }
}
Ejemplo n.º 4
0
void    pfGUICheckBoxCtrl::HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers )
{
    if( fClicking )
    {
        fClicking = false;

        if(fPlaySound)
            IPlaySound( kMouseUp );

        // Don't run the command if the mouse is outside our bounds
        if( fBounds.IsInside( &mousePt ) )
        {
            SetChecked( !fChecked );
            DoSomething();
        }
    }
}
Ejemplo n.º 5
0
void    pfGUIButtonMod::HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers )
{
    fClicking = true;
    if( fAnimationKeys.GetCount() > 0 )
    {
        plAnimCmdMsg *msg = new plAnimCmdMsg();
        msg->SetCmd( plAnimCmdMsg::kContinue );
        msg->SetCmd( plAnimCmdMsg::kSetForewards );
        msg->SetCmd( plAnimCmdMsg::kGoToBegin );    
        msg->SetAnimName( fAnimName );
        msg->AddReceivers( fAnimationKeys );
        plgDispatch::MsgSend( msg );
    }

    IPlaySound( kMouseDown );

    fOrigMouseDownPt = mousePt;
    if ( fNotifyType == kNotifyOnDown || fNotifyType == kNotifyOnUpAndDown)
    {
        fTriggering = true;
        DoSomething();
        fTriggering = false;
    }
}
Ejemplo n.º 6
0
void    pfGUICheckBoxCtrl::HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers )
{
    fClicking = true;
    if(fPlaySound)
        IPlaySound( kMouseDown );
}