self.surface.blit(img, (0, y_offset))
y_offset += 8
text = TextBoxWidget(
- (12, y_offset), action.TEXT,
+ (12, y_offset), action.get_text(),
box_width=(INFO_SIZE[0] - 12) // EIGHT_BIT_SCALE,
fontsize=28)
text.render(self.surface)
# self.chosen may be None, in which case we don't draw the border.
if choice == self.chosen:
- colour = (255, 255, 0, 128)
+ if not action.check_available(self.state.player):
+ colour = (255, 0, 0, 255)
+ else:
+ colour = (255, 255, 0, 128)
bottom = y_offset + text.surface.get_rect().height
right = text.surface.get_rect().width + 12
pygame.draw.lines(self.surface, colour, True,