Пример #1
0
    def __init__(self):
        super(BaseMenu, self).__init__()
        self.font_item['font_size'] = 40
        self.font_item_selected['font_size'] = self.font_item['font_size']
        self.font_item['color'] = (255, 255, 255, 255)
        self.font_item_selected['color'] = (192, 192, 192, 255)
        # self.start_menu = menu.ImageMenuItem('img/btn1.png', self.start_game)
        self.end_menu = menu.ImageMenuItem('img/btn3.png', self.end_game)

        menu_items = self.menu_items()
        menu_items.append(self.end_menu)
        self.create_menu(menu_items,
                         selected_effect=menu.shake(),
                         activated_effect=menu.shake_back())
Пример #2
0
 def menu_items(self):
     start_menu = menu.ImageMenuItem(u'img/btn1.png',
                                     callback_func=self.start_game)
     return [start_menu]
Пример #3
0
 def menu_items(self):
     resume_menu = menu.ImageMenuItem('img/btn4.png',self.pause_game)
     return [resume_menu]
Пример #4
0
    def __init__(self):
        super(GameMenu, self).__init__()
        parse_btn = menu.ImageMenuItem("img/pause.png",self.parse_game)
        self.create_menu([parse_btn])

        menu.fixedPositionMenuLayout([(40,config.WINDOS_HEIGHT-40)])(self)
Пример #5
0
 def menu_items(self):
     rest_menu = menu.ImageMenuItem('img/btn2.png',
                                    callback_func=self.rest_game)
     return [rest_menu]