@@ -0,0 +1,2036 @@
+import pygame%0Aimport pygameMenu%0Afrom game_logic import helper%0A%0A%0Aclass SettingsMenu(object):%0A%0A    def __init__(self, screen):%0A        # Settings menu%0A        self.__settings_menu = pygameMenu.Menu(%0A            screen,%0A            bgfun=lambda: screen.fill(helper.WHITE),%0A            color_selected=helper.BLACK,%0A            font=pygameMenu.font.FONT_HELVETICA,%0A            font_color=helper.BLACK,%0A            font_size=15,%0A            font_size_title=35,%0A            menu_alpha=100,%0A            menu_color=helper.WHITE,%0A            menu_height=int(helper.HEIGHT * 0.85),%0A            menu_width=int(helper.WIDTH * 0.9),%0A            # onclose=pygameMenu.events.DISABLE_CLOSE,%0A            title='Settings',%0A            widget_alignment=pygameMenu.locals.ALIGN_LEFT,%0A            window_height=helper.HEIGHT,%0A            window_width=helper.WIDTH%0A        )%0A%0A        self.__wid1 = self.__settings_menu.add_text_input(%0A            'Trials: ',%0A            default=10000,%0A            maxchar=6,%0A            textinput_id='trials',%0A            input_type=pygameMenu.locals.INPUT_INT,%0A            enable_selection=False)%0A%0A        # Create selector with 3 difficulty options%0A        self.__settings_menu.add_selector(%0A            'Select Oponent: ',%0A            %5B('Computer', 'COMPUTER'),%0A             ('Human', 'HUMAN')%5D,%0A            selector_id='oponent',%0A            default=0)%0A%0A        # Create selector with 3 difficulty options%0A        self.__settings_menu.add_selector(%0A            'Choose Player:',%0A            %5B('O', 'O'),%0A             ('X', 'X')%5D,%0A            selector_id='player'%0A            default=0)%0A%0A        self.__settings_menu.add_option(%0A            'Back', pygameMenu.events.CLOSE,%0A            align=pygameMenu.locals.ALIGN_CENTER)%0A%0A    def __call__(self):%0A        # Loop until back button is pressed%0A        self.__settings_menu.mainloop(disable_loop=False)%0A        print('Settings data:')%0A        data = self.__settings_menu.get_input_data()%0A        for k in data.keys():%0A            print(u'%5Ct%7B0%7D%5Ct=%3E%5Ct%7B1%7D'.format(k, data%5Bk%5D))%0A

Add settings menu