--- a/QTfrontend/ui/page/pagegamestats.cpp Fri Oct 11 16:33:01 2019 +0200
+++ b/QTfrontend/ui/page/pagegamestats.cpp Fri Oct 11 16:54:50 2019 +0200
@@ -121,7 +121,7 @@
btnRestart->setFixedHeight(81);
btnRestart->setStyleSheet("QPushButton{margin-top:24px}");
btnSave = addButton(":/res/Save.png", bottomLayout, 2, true);
- btnSave->setWhatsThis(tr("Save"));
+ saveDemoBtnEnabled(true);
btnSave->setStyleSheet("QPushButton{margin: 24px 0 0 0;}");
return bottomLayout;
@@ -174,6 +174,10 @@
void PageGameStats::saveDemoBtnEnabled(bool enabled)
{
btnSave->setEnabled(enabled);
+ if (enabled)
+ btnSave->setWhatsThis(tr("Save demo"));
+ else
+ btnSave->setWhatsThis(tr("Save demo (unavailable because the /lua command was used)"));
}
void PageGameStats::renderStats()
--- a/hedgewars/uTypes.pas Fri Oct 11 16:33:01 2019 +0200
+++ b/hedgewars/uTypes.pas Fri Oct 11 16:54:50 2019 +0200
@@ -515,7 +515,8 @@
sidWinner2, sidWinner3, sidWinner4, sidWinner5, sidWinner6,
sidWinner7, sidWinnerAll, sidTeamGone, sidTeamBack, sidAutoSkip,
sidFPS, sidLuaParsingOff, sidLuaParsingOn, sidLuaParsingDenied,
- sidAmmoCount, sidChat, sidChatTeam, sidChatHog, sidUnknownGearValue);
+ sidAmmoCount, sidChat, sidChatTeam, sidChatHog, sidUnknownGearValue,
+ sidVideoRecLuaFail);
TCmdHelpStrId = (
sidCmdHeaderBasic, sidCmdTogglechat, sidCmdTeam, sidCmdMe,
--- a/hedgewars/uVideoRec.pas Fri Oct 11 16:33:01 2019 +0200
+++ b/hedgewars/uVideoRec.pas Fri Oct 11 16:54:50 2019 +0200
@@ -48,7 +48,7 @@
procedure freeModule;
implementation
-uses uVariables, GLunit, SDLh, SysUtils, uUtils, uSound, uIO, uMisc, uTypes, uDebug;
+uses uVariables, GLunit, SDLh, SysUtils, uUtils, uSound, uChat, uIO, uMisc, uTypes, uDebug;
type TAddFileLogRaw = procedure (s: pchar); cdecl;
const AvwrapperLibName = {$IFDEF WIN32_VCPKG}'avwrapper'{$ELSE}'libavwrapper'{$ENDIF};
@@ -291,6 +291,7 @@
begin
// TODO: Show message to player
PlaySound(sndDenied);
+ AddChatString(#0 + shortstring(trmsg[sidVideoRecLuaFail]));
AddFileLog('Pre-recording prevented; /lua command was used before');
exit;
end;
--- a/share/hedgewars/Data/Locale/de.txt Fri Oct 11 16:33:01 2019 +0200
+++ b/share/hedgewars/Data/Locale/de.txt Fri Oct 11 16:54:50 2019 +0200
@@ -111,6 +111,7 @@
01:46=[Klan] %1: %2
01:47=[%1]: %2
01:48=?
+01:49=Videos können nicht aufgenommen werden, nachdem der /lua-Befehl benutzt wurde.
; Event messages
; Hog (%1) died
--- a/share/hedgewars/Data/Locale/en.txt Fri Oct 11 16:33:01 2019 +0200
+++ b/share/hedgewars/Data/Locale/en.txt Fri Oct 11 16:54:50 2019 +0200
@@ -121,6 +121,7 @@
01:47=[%1]: %2
; Symbol for unknown mine timer
01:48=?
+01:49=Videos can't be recorded after the /lua command was used.
; Event messages
; Normal hog (%1) died (0 health)