From ea25972e21f0d3ec599f7822981b40cf1b029e4a Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 7 Sep 2010 19:03:59 +0200 Subject: added rec notification by ghost91-. Closes #82 --- src/game/client/components/scoreboard.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/game/client/components/scoreboard.cpp') diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp index 5f9aeea7..2214c2d1 100644 --- a/src/game/client/components/scoreboard.cpp +++ b/src/game/client/components/scoreboard.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -261,6 +262,29 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch } } +void CScoreboard::RenderRecordingNotification(float x) +{ + if(!m_pClient->DemoRecorder()->IsRecording()) + return; + + //draw the box + Graphics()->BlendNormal(); + Graphics()->TextureSet(-1); + Graphics()->QuadsBegin(); + Graphics()->SetColor(0.0f, 0.0f, 0.0f, 0.4f); + RenderTools()->DrawRoundRectExt(x, 0.0f, 120.0f, 50.0f, 15.0f, CUI::CORNER_B); + Graphics()->QuadsEnd(); + + //draw the red dot + Graphics()->QuadsBegin(); + Graphics()->SetColor(1.0f, 0.0f, 0.0f, 1.0f); + RenderTools()->DrawRoundRect(x+20, 15.0f, 20.0f, 20.0f, 10.0f); + Graphics()->QuadsEnd(); + + //draw the text + TextRender()->Text(0, x+50.0f, 8.0f, 24.0f, "REC", -1); +} + void CScoreboard::OnRender() { bool DoScoreBoard = false; @@ -321,6 +345,7 @@ void CScoreboard::OnRender() RenderGoals(Width/2-w/2, 150+750+25, w); RenderSpectators(Width/2-w/2, 150+750+25+50+25, w); + RenderRecordingNotification((Width/7)*4); } bool CScoreboard::Active() -- cgit 1.4.1