Skip to content
Permalink
Browse files

/screenshot: Add error message when in editor (#1137)

  • Loading branch information...
lluchs committed Dec 23, 2017
1 parent 7ff9217 commit c964fa1c84e31ffbe27c5c9e4f48268e4d7c0455
Showing with 7 additions and 1 deletion.
  1. +1 −0 planet/System.ocg/LanguageDE.txt
  2. +1 −0 planet/System.ocg/LanguageUS.txt
  3. +5 −1 src/game/C4GraphicsSystem.cpp
@@ -974,6 +974,7 @@ IDS_PRC_SAVEPLR=Spielerdatei %s wird gespeichert...
IDS_PRC_SCEOWNDEFS=Szenario benutzt vorgegebene Objektdefinitionen.
IDS_PRC_SCREENSHOT=Screenshot %s wird gespeichert...
IDS_PRC_SCREENSHOTERROR=Fehler beim Erstellen des Screenshots %s.
IDS_PRC_SCREENSHOTERROREDITOR=Screenshots im Editor sind nicht unterstützt.
IDS_PRC_START=Spiel gestartet.
IDS_PRC_STARTABORTED=Spielstart abgebrochen.
IDS_PRC_SYNCPLRS=Lokale Spielerdateien werden synchronisiert...
@@ -974,6 +974,7 @@ IDS_PRC_SAVEPLR=Saving player file %s...
IDS_PRC_SCEOWNDEFS=Scenario uses specified object definitions.
IDS_PRC_SCREENSHOT=Saving screenshot %s...
IDS_PRC_SCREENSHOTERROR=Failure creating screenshot %s.
IDS_PRC_SCREENSHOTERROREDITOR=Screenshots are not supported in editor mode.
IDS_PRC_START=Game started.
IDS_PRC_STARTABORTED=Game start aborted.
IDS_PRC_SYNCPLRS=Synchronizing local player files...
@@ -217,7 +217,11 @@ bool C4GraphicsSystem::SaveScreenshot(bool fSaveAll, float fSaveAllZoom)
bool C4GraphicsSystem::DoSaveScreenshot(bool fSaveAll, const char *szFilename, float fSaveAllZoom)
{
// Fullscreen only
if (Application.isEditor) return false;
if (Application.isEditor)
{
Log(LoadResStr("IDS_PRC_SCREENSHOTERROREDITOR"));
return false;
}
// back surface must be present
if (!FullScreen.pSurface) return false;

0 comments on commit c964fa1

Please sign in to comment.
You can’t perform that action at this time.