示例#1
0
    def test_example_multi_input(self) -> None:
        """
        Test multi-input example.
        """
        multi_input.main(test=True)
        multi_input.check_name_test('name')
        multi_input.update_menu_sound(('sound', None), True)
        multi_input.update_menu_sound(('sound', None), False)

        # Test methods within submenus
        settings = multi_input.main_menu.get_submenus()[0]
        settings.get_widget('store').apply()

        # Check range slider has event
        rslider = settings.get_widget('range_slider')
        self.assertIsNotNone(rslider._onchange)
        self.assertEqual(rslider.get_value(), 50)
        rslider.set_value(69)
        rslider.change()
        self.assertEqual(settings.get_widget('progress').get_value(), 69)

        more_settings = multi_input.main_menu.get_submenus()[1]
        # noinspection PyTypeChecker
        hex_color_widget: 'pygame_menu.widgets.ColorInput' = more_settings.get_widget(
            'hex_color')
        hex_color_widget.apply()
示例#2
0
    def test_example_multi_input() -> None:
        """
        Test multi-input example.
        """
        multi_input.main(test=True)
        multi_input.check_name_test('name')
        multi_input.update_menu_sound(('sound', None), True)
        multi_input.update_menu_sound(('sound', None), False)

        # Test methods within submenus
        settings = multi_input.main_menu.get_submenus()[0]
        settings.get_widget('store').apply()

        more_settings = multi_input.main_menu.get_submenus()[1]
        # noinspection PyTypeChecker
        hex_color_widget: 'pygame_menu.widgets.ColorInput' = more_settings.get_widget(
            'hex_color')
        hex_color_widget.apply()
        test_reset_surface()
示例#3
0
 def test_example_multi_input() -> None:
     """
     Test multi-input example.
     """
     multi_input.main(test=True)
     test_reset_surface()
示例#4
0
 def test_example_multi_input():
     """
     Test multi-input example.
     """
     multi_input.main(test=True)