]> ruin.nu Git - hbs.git/commitdiff
added colors to the battle report..
authorMichael Andreen <harv@ruin.nu>
Mon, 1 Jul 2002 18:49:57 +0000 (18:49 +0000)
committerMichael Andreen <harv@ruin.nu>
Mon, 1 Jul 2002 18:49:57 +0000 (18:49 +0000)
bs/bsview.cpp

index b5e25b0a2c88fe8d21c46ea1faa9af4c7973625d..48b0c59c1083415269516d73970bc913b0ae8e76 100644 (file)
@@ -517,7 +517,13 @@ void BSView::slotGenerateReport()
                                {
                                        for(map<string, map<string, int> >::iterator l = k->second.begin(); l != k->second.end(); ++l)
                                        {
-                                               t.append(QString("<li>%0 %1 %2 killing/blocking at: \n").arg(l->second["000"]).arg(k->first.c_str()).arg(l->first.c_str()));
+                                               QString color;
+                                               if (k->first == "Friendly")
+                                                       color = "#46AA1B";
+                                               if (k->first == "Hostile")
+                                                       color = "#FF0000";
+
+                                               t.append(QString("<li><font color=\"%3\"> %0 %1 %2 killing/blocking at: </font> \n").arg(l->second["000"]).arg(k->first.c_str()).arg(l->first.c_str()).arg(color));
                                                t.append("<ul type=square>\n");
 
                                                for(map<string, int>::iterator m = l->second.begin(); m != l->second.end(); ++m)