Am trying to block mouse at some time after button click, so I have created a function:
import pygame
import game_cache
import time
def set_mouse_blocked(boolean, timer=False):
if boolean:
game_cache.is_mouse_active = False
if timer:
...
else:
game_cache.is_mouse_active = True
How to complete this function without a cycle?
P.S. There is no opportunity to use cycle, because this function called in cycle