贴过来
[RenPy] 纯文本查看 复制代码 label disable_user_interaction():
python:
## pygame这个是为了在转场的时候,用户不能和按钮交互
#pygame.event.set_allowed(None)
#pygame.event.set_allowed(pygame.USEREVENT)
pygame.event.set_blocked(pygame.MOUSEWHEEL)
pygame.event.set_blocked(pygame.MOUSEBUTTONUP)
pygame.event.set_blocked(pygame.MOUSEBUTTONDOWN)
pygame.event.set_blocked(pygame.KEYDOWN)
pygame.event.set_blocked(pygame.KEYUP)
pygame.event.set_blocked(pygame.QUIT)
## 关闭也需要禁止,否则因为不能交互,不能点击确认关闭的窗口
## pygame.event.set_allowed(pygame.QUIT)
return
label enable_user_interaction():
## 结束禁止交互
#$ pygame.event.set_blocked(None)
python:
pygame.event.set_allowed(pygame.MOUSEWHEEL)
pygame.event.set_allowed(pygame.MOUSEBUTTONUP)
pygame.event.set_allowed(pygame.MOUSEBUTTONDOWN)
pygame.event.set_allowed(pygame.KEYDOWN)
pygame.event.set_allowed(pygame.KEYUP)
pygame.event.set_allowed(pygame.QUIT)
return |