X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fwidgets%2Finfo_area.py;h=c46c93da04a4b378e6a0739440034af3aa981915;hb=72a347097e53a92bedda692da7cdb34f8b370437;hp=3e9152a34cf3630f6b49ef214d52e533e9ddee64;hpb=50fc56b0b204b8a5d5204dfb06f140cef1ba4fa0;p=naja.git 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