diff options
| author | oy <Tom_Adams@web.de> | 2010-09-07 19:03:59 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-09-07 19:03:59 +0200 |
| commit | ea25972e21f0d3ec599f7822981b40cf1b029e4a (patch) | |
| tree | 578fa85d0d8d43bfde37458a9a723226c6644df4 | |
| parent | 5e1b3c74ef898cfb5a802eaf7acc60483a2eb81b (diff) | |
| download | zcatch-ea25972e21f0d3ec599f7822981b40cf1b029e4a.tar.gz zcatch-ea25972e21f0d3ec599f7822981b40cf1b029e4a.zip | |
added rec notification by ghost91-. Closes #82
| -rw-r--r-- | src/game/client/components/scoreboard.cpp | 25 | ||||
| -rw-r--r-- | src/game/client/components/scoreboard.h | 1 |
2 files changed, 26 insertions, 0 deletions
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 <engine/demo.h> #include <engine/graphics.h> #include <engine/textrender.h> #include <engine/shared/config.h> @@ -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() diff --git a/src/game/client/components/scoreboard.h b/src/game/client/components/scoreboard.h index f94c6b49..be0292cf 100644 --- a/src/game/client/components/scoreboard.h +++ b/src/game/client/components/scoreboard.h @@ -7,6 +7,7 @@ class CScoreboard : public CComponent void RenderGoals(float x, float y, float w); void RenderSpectators(float x, float y, float w); void RenderScoreboard(float x, float y, float w, int Team, const char *pTitle); + void RenderRecordingNotification(float x); static void ConKeyScoreboard(IConsole::IResult *pResult, void *pUserData); |