Make action.MSB_GLYPH a function, action.get_msb_glyph.
authorSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 18:37:31 +0000 (20:37 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 18:37:31 +0000 (20:37 +0200)
naja/actions.py
naja/widgets/info_area.py
naja/widgets/tile.py

index 5f282353557078e8ff3bf671d2684a30e699f199..d5e2b37227b0fb22f3ad512b6381e9537d43b4c3 100644 (file)
@@ -19,6 +19,9 @@ class LocationAction(object):
     def get_glyphs(self):
         return self.GLYPHS
 
+    def get_msb_glyph(self):
+        return self.MSB_GLYPH
+
     def get_text(self, location=None):
         substitutions = self.data.copy()
 
index 40dcdc031d68267388f52b32644107a0811495ba..34bbec746df01e9756ae092e31d1a9811922b96c 100644 (file)
@@ -153,9 +153,9 @@ class InfoAreaWidget(Widget):
                 glyph, transforms=(EIGHT_BIT, blender(PALETTE.GREY)))
             self.surface.blit(img, (glyphs_x_offset, glyphs_y_offset - 4))
             glyphs_x_offset += img.get_width()
-        if action.MSB_GLYPH is not None:
+        if action.get_msb_glyph() is not None:
             img = resources.get_image(
-                action.MSB_GLYPH,
+                action.get_msb_glyph(),
                 transforms=(EIGHT_BIT, blender(PALETTE.LIGHT_VIOLET)))
             self.surface.blit(img, (glyphs_x_offset, glyphs_y_offset - 4))
 
index e925674b44aae8b3440a73044c5969eefcc1b747..9e8fe8508056dae9bc61a4e93ccd547c772514d9 100644 (file)
@@ -121,9 +121,9 @@ class TileWidget(Widget):
                 img = resources.get_image(glyph, transforms=(EIGHT_BIT,))
                 self.surface.blit(img, (x_offset, y_offset + 4))
                 x_offset += img.get_width()
-            if action.MSB_GLYPH is not None:
+            if action.get_msb_glyph() is not None:
                 img = resources.get_image(
-                    action.MSB_GLYPH,
+                    action.get_msb_glyph(),
                     transforms=(EIGHT_BIT, blender(PALETTE.LIGHT_VIOLET)))
                 self.surface.blit(img, (x_offset, y_offset + 4))
                 x_offset += img.get_width()