如果鼠标移出了窗口范围,则即使鼠标抬起也不会收到EventType.MouseUp消息,所以只写

if(event==EventType.MouseUp){

  执行某操作

}

是错误的,会导致非常奇怪的bug,要写成:

if(event==EventType.MouseUp||鼠标移出窗口范围){

  执行某操作

}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2021-12-30
  • 2021-05-15
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-11
相关资源
相似解决方案