From: Simon Cross Date: Sat, 17 May 2014 18:37:31 +0000 (+0200) Subject: Make action.MSB_GLYPH a function, action.get_msb_glyph. X-Git-Tag: 0.1~44 X-Git-Url: https://git.ctpug.org.za/?p=naja.git;a=commitdiff_plain;h=35a06a04c73ef08e058ffa957feda63a705fa96a Make action.MSB_GLYPH a function, action.get_msb_glyph. --- 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()