Пример #1
0
    def _getHelpText(self):
        help = (_('''\
1: 2 3 4 5 6 7 8 9 T J Q K
2: 4 6 8 T Q A 3 5 7 9 J K
3: 6 9 Q 2 5 8 J A 4 7 T K
4: 8 Q 3 7 J 2 6 T A 5 9 K'''))
        # calculate text_width
        lines = help.split('\n')
        lines.sort(lambda a, b: cmp(len(a), len(b)))
        max_line = lines[-1]
        text_width = get_text_width(max_line,
                                    font=self.app.getFont("canvas_fixed"))
        return help, text_width
Пример #2
0
    def _getHelpText(self):
        help = (_('''\
1: 2 3 4 5 6 7 8 9 T J Q K
2: 4 6 8 T Q A 3 5 7 9 J K
3: 6 9 Q 2 5 8 J A 4 7 T K
4: 8 Q 3 7 J 2 6 T A 5 9 K'''))
        # calculate text_width
        lines = help.split('\n')
        lines.sort(lambda a, b: cmp(len(a), len(b)))
        max_line = lines[-1]
        text_width = get_text_width(max_line,
                                    font=self.app.getFont("canvas_fixed"))
        return help, text_width