Пример #1
0
                if not main_menu.is_started and not main_menu.is_shopped and not main_menu.in_garage and not main_menu.in_settings:
                    main_menu.check_mouse_motion(event.pos)
                if main_menu.is_shopped:
                    shop.check_mouse_motion(event.pos)
                if main_menu.in_garage:
                    garage.check_mouse_motion(event.pos)
                if main_menu.in_roads:
                    road_select.check_mouse_motion(event.pos)
                if main_menu.in_settings:
                    settings.check_mouse_motion(event.pos)

            if event.type == pygame.MOUSEBUTTONDOWN:
                if not main_menu.is_started and not main_menu.is_shopped and not main_menu.in_garage and not main_menu.in_settings:
                    main_menu.check_mouse_down(event.pos)
                if main_menu.is_shopped:
                    shop.check_mouse_down(event.pos)
                if main_menu.in_garage:
                    garage.check_mouse_down(event.pos)
                if main_menu.in_roads:
                    road_select.check_mouse_down(event.pos)
                if main_menu.in_settings:
                    settings.check_mouse_down(event.pos)
            if event.type == pygame.MOUSEBUTTONUP:
                if not main_menu.is_started and not main_menu.is_shopped and not main_menu.in_garage and not main_menu.in_settings:
                    main_menu.check_mouse_up()
                if main_menu.is_shopped:
                    shop.check_mouse_up()
                if main_menu.in_garage:
                    garage.check_mouse_up()
                if main_menu.in_roads:
                    road_select.check_mouse_up()