- self.list_actions(screen, action_number = action_number)
-
- self.mapping.finished_running(self, start_time)
-
- def list_actions(self, screen, action_number = 0):
- action_descriptions = [action.description() for action in self.actions]
- #print("actions linked to key {}:".format(self.key_sym))
- #print("\t" + "\n\t".join(action_descriptions))
- self.draw_lock.acquire()
- surface = pygame.Surface((690, 250)).convert()
- surface.fill((250, 250, 250))
- police = font(14)
-
- offset = 0
- police.set_bold(True)
- text = police.render("actions linked to key {}:".format(self.key_sym), True, (0,0,0))
- surface.blit(text, (0, offset))
- offset += police.get_linesize()
-
- police.set_bold(False)
- icon_police = font(14, font = "Symbola")
- for index, description in enumerate(action_descriptions):
- if index < int(action_number):
- icon = icon_police.render("✓", True, (0,0,0))
- elif index + 0.5 == action_number:
- icon = icon_police.render("✅", True, (0,0,0))
- else:
- icon = icon_police.render(" ", True, (0,0,0))
-
- text = police.render(description, True, (0,0,0))
- surface.blit(icon, (0, offset))
- surface.blit(text, (10, offset))
- offset += police.get_linesize()