Example #1
0
void JBlotPiece::MoveToHomePos()
{
    Frame ext   = GetLocalExt();
    ext.x       = m_HomePos.x;
    ext.y       = m_HomePos.y;
    m_MovePos.x = ext.x;
    m_MovePos.y = ext.y;
    m_bAtHome   = true;

    SetLocalExt( ext );
} // JBlotPiece::MoveToHomePos
Example #2
0
void JButton::Unpress()
{
    if (m_bPressed)
    {
        Frame ext = GetLocalExt();
        ext.x  -= float( m_PressDX );
        ext.y  -= float( m_PressDY );
        SetLocalExt( ext );
    }

    m_bPressed = false;
    SendSignal( "Unpress" );
    SendSignal( "Pressed" );
    OnUnpress();
} // JButton::Unpress
Example #3
0
void JButton::Press()
{
    if (!m_bPressed)
    {
        Frame ext = GetLocalExt();
        ext.x  += float( m_PressDX );
        ext.y  += float( m_PressDY );
        SetLocalExt( ext );
    }

    m_bPressed = true;
    SendSignal( "Press" );
    SendSignal( "Pressed" );
    OnPress();
} // JButton::Press
Example #4
0
void JBlotPiece::MoveTo( Vec2 pos, bool bImmediately )
{ 
    if (bImmediately)
    {
        Frame ext   = GetLocalExt();
        ext.x       = pos.x;
        ext.y       = pos.y;
        SetLocalExt( ext );
        m_bAtHome = (m_HomePos.dist( pos ) < c_FltEpsilon);
    }
    else
    {
        m_bMoving = true;
        m_StartMoveTime = JAnimServer::s_pInstance->GetCurTime(); 
    }
    m_MovePos = pos; 
}
Example #5
0
JObjectTree::JObjectTree()
{
    m_DefaultRootPos    = Vec2( 10, 400 );
    m_RootPos           = m_DefaultRootPos;
    m_NodeCaptionPos    = Vec2( 2.0f, 1.0f );

    m_pRoot             = NULL;
    m_pSelected         = NULL;
    m_pExpanded         = NULL;
    m_ConnectColor      = 0xBB2222FF;
    m_NodeHeight        = 15.0f;
    m_NodeWidth         = 90.0f;

    m_pDraggedNode      = NULL;

    m_bCanDrop          = false;
    m_DragShift         = Vec2::null;
    m_InsExt            = Frame::null;
    m_InsColor          = 0x88FF3333;

    SetLocalExt( Frame( 0.0f, 0.0f, 1600.0f, 1200.0f ) );
} // JObjectTree::JObjectTree