diff options
Diffstat (limited to 'src/graphics/engine/engine.cpp')
-rw-r--r-- | src/graphics/engine/engine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 03bff72..3c642ae 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -520,6 +520,11 @@ void CEngine::SetStatisticPos(Math::Vector pos) m_statisticPos = pos; } +void CEngine::SetTimerDisplay(const std::string& text) +{ + m_timerText = text; +} + /******************************************************* @@ -3510,6 +3515,7 @@ void CEngine::DrawInterface() DrawMouse(); DrawHighlight(); DrawStats(); + DrawTimer(); } void CEngine::UpdateGroundSpotTextures() @@ -4479,6 +4485,14 @@ void CEngine::DrawStats() m_text->DrawText(str.str(), FONT_COLOBOT, 12.0f, pos, 1.0f, TEXT_ALIGN_LEFT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); } +void CEngine::DrawTimer() +{ + SetState(ENG_RSTATE_TEXT); + + Math::Point pos(0.98f, 0.98f-m_text->GetAscent(FONT_COLOBOT, 15.0f)); + m_text->DrawText(m_timerText, FONT_COLOBOT, 15.0f, pos, 1.0f, TEXT_ALIGN_RIGHT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); +} + } // namespace Gfx |