Ejemplo n.º 1
0
void CDisplayInfo::StopDisplayInfo()
{
    Ui::CWindow*        pw;

    pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4));
    if ( pw == nullptr )  return;

    m_interface->DeleteControl(EVENT_WINDOW4);

    if ( m_bEditLock )  // editing running program?
    {
        pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW3));
        if ( pw != nullptr )
        {
            pw->SetState(STATE_ENABLE);  // CStudio operating
        }
    }
    else
    {
        m_main->SetEditLock(false, false);

        pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
        if (pw != nullptr) pw->SetState(STATE_VISIBLE | STATE_ENABLE);
    }
    m_pause->DeactivatePause(m_satcomPause);
    m_satcomPause = nullptr;
    m_camera->SetType(m_infoCamera);

    m_engine->SetDrawWorld(true);  // draws all on the interface
    m_engine->SetDrawFront(false);  // draws nothing on the interface
    m_particle->SetFrameUpdate(Gfx::SH_WORLD, true);
    m_particle->FlushParticle(Gfx::SH_FRONT);
    m_particle->FlushParticle(Gfx::SH_INTERFACE);

    if ( m_toto != nullptr )
    {
        assert(m_toto->Implements(ObjectInterfaceType::Movable));
        CMotionToto* toto = static_cast<CMotionToto*>(dynamic_cast<CMovableObject*>(m_toto)->GetMotion());
        assert(toto != nullptr);
        toto->StopDisplayInfo();
    }

    m_light->DeleteLight(m_lightSuppl);
    m_lightSuppl = -1;
}
Ejemplo n.º 2
0
void CDisplayInfo::StopDisplayInfo()
{
    Ui::CWindow*        pw;
    CMotionToto*    toto;

    pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4));
    if ( pw == 0 )  return;

    m_interface->DeleteControl(EVENT_WINDOW4);

    if ( m_bEditLock )  // editing running program?
    {
        pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW3));
        if ( pw != 0 )
        {
            pw->SetState(STATE_ENABLE);  // CStudio operating
        }
    }
    else
    {
        m_pause->SetPause(m_bInitPause);
        m_main->SetEditLock(false, false);
    }
    m_camera->SetType(m_infoCamera);

    m_engine->SetDrawWorld(true);  // draws all on the interface
    m_engine->SetDrawFront(false);  // draws nothing on the interface
    m_particle->SetFrameUpdate(Gfx::SH_WORLD, true);
    m_particle->FlushParticle(Gfx::SH_FRONT);
    m_particle->FlushParticle(Gfx::SH_INTERFACE);

    if ( m_toto != 0 )
    {
        toto = static_cast<CMotionToto*>(m_toto->GetMotion());
        if ( toto != 0 )
        {
            toto->StopDisplayInfo();
        }
    }

    m_light->DeleteLight(m_lightSuppl);
    m_lightSuppl = -1;
}