diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-07 01:06:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-07 01:06:40 +0300 |
commit | 7bbd2004db69dcf456a606a350d315e2fefa7d4f (patch) | |
tree | b256c460bc3a6baa081ccab5596bc7d8aff0fab6 /src/game.cpp | |
parent | 6b291b6515825f4ce0e09df5dec7ea1b619b63a7 (diff) | |
download | mv-7bbd2004db69dcf456a606a350d315e2fefa7d4f.tar.gz mv-7bbd2004db69dcf456a606a350d315e2fefa7d4f.tar.bz2 mv-7bbd2004db69dcf456a606a350d315e2fefa7d4f.tar.xz mv-7bbd2004db69dcf456a606a350d315e2fefa7d4f.zip |
Add option to print server name in screenshots.
Enabled by default.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index b00dfc81f..df165d3d8 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -48,6 +48,7 @@ #include "input/joystick.h" #include "input/keyboardconfig.h" +#include "gui/font.h" #include "gui/gui.h" #include "gui/viewport.h" #include "gui/windowmenu.h" @@ -479,6 +480,15 @@ Game::~Game() PlayerInfo::gameDestroyed(); } +void Game::addWatermark() +{ + if (!boldFont || !config.getBoolValue("addwatermark")) + return; + mainGraphics->setColorAll(Theme::getThemeColor(Theme::TEXT), + Theme::getThemeColor(Theme::TEXT_OUTLINE)); + boldFont->drawString(mainGraphics, client->getServerName(), 100, 50); +} + bool Game::createScreenshot() { if (!mainGraphics) @@ -491,11 +501,13 @@ bool Game::createScreenshot() mainGraphics->setSecure(true); mainGraphics->prepareScreenshot(); gui->draw(); + addWatermark(); screenshot = mainGraphics->getScreenshot(); mainGraphics->setSecure(false); } else { + addWatermark(); screenshot = mainGraphics->getScreenshot(); } |