Fixed 'invui' disabling too much

master
krzys-h 2015-09-12 11:51:03 +02:00
parent 21a7f1bced
commit 389aaaf132
1 changed files with 9 additions and 10 deletions

View File

@ -3155,12 +3155,9 @@ void CEngine::Render()
UseMSAA(false); UseMSAA(false);
if (m_renderInterface)
{
m_app->StartPerformanceCounter(PCNT_RENDER_INTERFACE); m_app->StartPerformanceCounter(PCNT_RENDER_INTERFACE);
DrawInterface(); DrawInterface();
m_app->StopPerformanceCounter(PCNT_RENDER_INTERFACE); m_app->StopPerformanceCounter(PCNT_RENDER_INTERFACE);
}
// End the scene // End the scene
m_device->EndScene(); m_device->EndScene();
@ -3831,7 +3828,7 @@ void CEngine::DrawInterface()
// Draw the entire interface // Draw the entire interface
Ui::CInterface* interface = CRobotMain::GetInstancePointer()->GetInterface(); Ui::CInterface* interface = CRobotMain::GetInstancePointer()->GetInterface();
if (interface != nullptr) if (interface != nullptr && m_renderInterface)
{ {
interface->Draw(); interface->Draw();
} }
@ -3840,7 +3837,7 @@ void CEngine::DrawInterface()
m_lastState = -1; m_lastState = -1;
SetState(Gfx::ENG_RSTATE_NORMAL); SetState(Gfx::ENG_RSTATE_NORMAL);
if (!m_screenshotMode) if (!m_screenshotMode && m_renderInterface)
{ {
m_particle->DrawParticle(SH_INTERFACE); // draws the particles of the interface m_particle->DrawParticle(SH_INTERFACE); // draws the particles of the interface
} }
@ -3927,9 +3924,11 @@ void CEngine::DrawInterface()
DrawOverColor(); DrawOverColor();
// At the end to not overlap // At the end to not overlap
if (m_renderInterface)
DrawHighlight(); DrawHighlight();
DrawTimer(); DrawTimer();
DrawStats(); DrawStats();
if (m_renderInterface)
DrawMouse(); DrawMouse();
} }