From d9f031952493664849860837041f99b4252f7509 Mon Sep 17 00:00:00 2001 From: Jeremy Thurgood Date: Wed, 14 May 2014 13:50:04 +0200 Subject: [PATCH] Hacky card bits display. --- naja/widgets/info_area.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/naja/widgets/info_area.py b/naja/widgets/info_area.py index 3e9152a..c46c93d 100644 --- a/naja/widgets/info_area.py +++ b/naja/widgets/info_area.py @@ -44,6 +44,14 @@ class InfoAreaWidget(Widget): colour=(255, 255, 255)) title.render(self.surface) y_offset = title.surface.get_rect().height + 8 + + # TODO: Make this better. + bits_text = ''.join('1' if bit in self.card.bitwise_operand else '0' + for bit in reversed(range(8))) + card_bits = TextWidget((0, y_offset), bits_text, colour=(255, 255, 0)) + card_bits.render(self.surface) + y_offset += card_bits.surface.get_rect().height + 8 + for choice, action in enumerate(self.card.actions): y_offset = self.prepare_action(choice, action, y_offset) # We cheat horribly for layout reasons -- 2.34.1