]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Fixed gametype display in "minimal" skin
authorJan D. Behrens <zykure@web.de>
Thu, 30 Aug 2012 11:15:29 +0000 (13:15 +0200)
committerJan D. Behrens <zykure@web.de>
Thu, 30 Aug 2012 11:18:23 +0000 (13:18 +0200)
xonstat/batch/badges/gen_badges.py
xonstat/batch/badges/skin.py

index 82620b26e4e4ef90aec6161c4b31ee431962d81d..1d3acf1a02c1ac49ba69a73f69129a420560aa0d 100644 (file)
@@ -42,23 +42,24 @@ skin_minimal = Skin( "minimal",
         nick_pos        = (36,16),
         num_gametypes   = 3,
         nick_maxwidth   = 300,
-        gametype_pos    = (78,30),
+        gametype_pos    = (70,30),
         gametype_color  = (0.0, 0.0, 0.0),
         gametype_text   = "%s:",
-        gametype_width  = 96,
+        gametype_width  = 100,
         gametype_fontsize = 10,
         gametype_align  = -1,
-        elo_pos         = (82,30),
+        gametype_upper  = False,
+        elo_pos         = (75,30),
         elo_text        = "Elo %.0f",
         elo_color       = (0.7, 0.7, 0.7),
         elo_align       = 1,
         rank_pos        = None,
-        nostats_pos     = (82,30),
-        nostats_fontsize = 10,
-        nostats_angle   = 0,
-        nostats_text    = "no stats!",
-        nostats_color   = (0.7, 0.4, 0.4),
-        nostats_center  = False,
+        nostats_pos     = None,
+        #nostats_pos     = (75,30),
+        #nostats_fontsize = 10,
+        #nostats_angle   = 0,
+        #nostats_text    = "no stats yet!",
+        #nostats_color   = (0.7, 0.4, 0.4),
         kdr_pos         = (392,15),
         kdr_fontsize    = 10,
         kdr_colortop    = (0.6, 0.8, 0.6),
index 508344649cd74a27376242395a2c89b38602af93..40ae0eb3712cf80a09a758f52d608a64d9c6f74e 100644 (file)
@@ -76,6 +76,7 @@ class Skin:
             'gametype_color':   (0.9, 0.9, 0.9),
             'gametype_text':    "%s",
             'gametype_align':   0,
+            'gametype_upper':   True,
             'num_gametypes':    3,
             'nostats_fontsize': 12,
             'nostats_pos':      (101,59),
@@ -345,7 +346,10 @@ class Skin:
 
                 offset = (xoffset, yoffset)
                 if self.gametype_pos:
-                    txt = self.gametype_text % gt.upper()
+                    if self.gametype_upper:
+                        txt = self.gametype_text % gt.upper()
+                    else:
+                        txt = self.gametype_text % gt.lower()
                     self.set_font(self.gametype_fontsize, self.gametype_color, bold=True)
                     self.show_text(txt, self.gametype_pos, self.gametype_align, offset=offset)