import pygame.locals as pgl
from naja.constants import (INFO_SIZE, EIGHT_BIT_SCALE, ACT, KEYS,
- EXAMINE)
+ EXAMINE, PALETTE)
from naja.events import finish_event
from naja.resources import resources
from naja.resources.mutators import EIGHT_BIT
box_width=(INFO_SIZE[0] - 16) // 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:
- if not action.check_available(self.state.player):
- colour = (255, 0, 0, 255)
- else:
- colour = (255, 255, 0, 128)
+ border_colour = None
+ if not action.check_available(self.state.player):
+ border_colour = PALETTE.ORANGE + (255,)
+ elif choice == self.chosen:
+ border_colour = PALETTE.PINK + (128,)
+ else:
+ border_colour = PALETTE.GREEN + (128,)
+ if border_colour:
bottom = y_offset + text.surface.get_rect().height
- right = text.surface.get_rect().width + 12
- pygame.draw.lines(self.surface, colour, True,
+ right = text.surface.get_rect().width + 18
+ pygame.draw.lines(self.surface, border_colour, True,
[(18, y_offset), (right, y_offset),
(right, bottom), (18, bottom)], 4)
if action.required_bits: