How do I prevent resuming after a callback function interruption?
显示 更早的评论
Hello,
I am coding the card game ERS. When I interrupt the computations under one keypress with another keypress, I would like the code not to return to the original computations it was performing initially. I have tried this implementation, but I was unsuccessful.
function UIFigureKeyPress(app, event)
key = event.Key;
switch key
case 'space' % Slap key
...
return
case 'p' % Place key
...
return
end
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!