From 35a06a04c73ef08e058ffa957feda63a705fa96a Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 17 May 2014 20:37:31 +0200 Subject: [PATCH] Make action.MSB_GLYPH a function, action.get_msb_glyph. --- naja/actions.py | 3 +++ naja/widgets/info_area.py | 4 ++-- naja/widgets/tile.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/naja/actions.py b/naja/actions.py index 5f28235..d5e2b37 100644 --- a/naja/actions.py +++ b/naja/actions.py @@ -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() diff --git a/naja/widgets/info_area.py b/naja/widgets/info_area.py index 40dcdc0..34bbec7 100644 --- a/naja/widgets/info_area.py +++ b/naja/widgets/info_area.py @@ -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)) diff --git a/naja/widgets/tile.py b/naja/widgets/tile.py index e925674..9e8fe85 100644 --- a/naja/widgets/tile.py +++ b/naja/widgets/tile.py @@ -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() -- 2.34.1