added custom stats message
authorPeriklis Ntanasis <pntanasis@gmail.com>
Tue, 04 Jun 2013 00:10:48 +0300
changeset 9172 72bfa6a3e8e2
parent 9171 e72f4f37a444
child 9173 575dd8fe4a55
added custom stats message
QTfrontend/hedgewars.qrc
QTfrontend/ui/page/pagegamestats.cpp
hedgewars/uIO.pas
hedgewars/uTypes.pas
--- a/QTfrontend/hedgewars.qrc	Mon Jun 03 23:18:24 2013 +0300
+++ b/QTfrontend/hedgewars.qrc	Tue Jun 04 00:10:48 2013 +0300
@@ -133,6 +133,7 @@
         <file>res/StatsMostSelfDamage.png</file>
         <file>res/StatsSelfKilled.png</file>
         <file>res/StatsSkipped.png</file>
+        <file>res/StatsCustomAchievement.png</file>
         <file>res/Start.png</file>
         <file>res/mapRandom.png</file>
         <file>res/mapMaze.png</file>
--- a/QTfrontend/ui/page/pagegamestats.cpp	Mon Jun 03 23:18:24 2013 +0300
+++ b/QTfrontend/ui/page/pagegamestats.cpp	Tue Jun 04 00:10:48 2013 +0300
@@ -300,6 +300,12 @@
             AddStatText(message);
             break;
         }
+        case 'c' :
+        {
+            QString message = "<p><img src=\":/res/StatsCustomAchievement.png\"> "+info+" </p>";
+            AddStatText(message);
+            break;
+        }
 
     }
 }
--- a/hedgewars/uIO.pas	Mon Jun 03 23:18:24 2013 +0300
+++ b/hedgewars/uIO.pas	Tue Jun 04 00:10:48 2013 +0300
@@ -212,7 +212,7 @@
 end;
 
 procedure SendStat(sit: TStatInfoType; s: shortstring);
-const stc: array [TStatInfoType] of char = ('r', 'D', 'k', 'K', 'H', 'T', 'P', 's', 'S', 'B');
+const stc: array [TStatInfoType] of char = ('r', 'D', 'k', 'K', 'H', 'T', 'P', 's', 'S', 'B', 'c');
 var buf: shortstring;
 begin
 buf:= 'i' + stc[sit] + s;
--- a/hedgewars/uTypes.pas	Mon Jun 03 23:18:24 2013 +0300
+++ b/hedgewars/uTypes.pas	Tue Jun 04 00:10:48 2013 +0300
@@ -164,7 +164,7 @@
 
     TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs,
             siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage,
-            siMaxTeamKills, siMaxTurnSkips );
+            siMaxTeamKills, siMaxTurnSkips, siCustomAchievement );
 
     // Various "emote" animations a hedgehog can do
     TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle);