How do I prevent resuming after a callback function interruption?
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!