Merged
Conversation
|
firebase-deployment: https://evy-lang--107-wk3w8m4y.web.app (672617e) |
35a4d2d to
a09210b
Compare
camh-
approved these changes
Mar 17, 2023
| dot x y radius hue | ||
|
|
||
| on animate | ||
| if stopped |
Member
There was a problem hiding this comment.
This is very tricksy! I was trying to figure out how an evy program actually stopped itself and wondered if there was something magical about this stopped variable. Turns out it was just that the run/stop button had focus so it also triggers when you press space. If you move the focus away manually and press space, the dot stops but not the program.
Just commenting.
Member
Author
There was a problem hiding this comment.
Hmm, good point! I always use cmd+enter to start the program these days.
I've added an unfocusRunButton function if we register the key-listener.
Let me know if you like that.
Improve cmd+enter shortcut to start a program so that key events will be listened to straight away. If the focus remains on the editor the key events are ignored so that code can be edited while a program is running. Before this change one had to click on the canvas before key events came in to the evy program.
cd66414 to
87a617d
Compare
Unfocus run button when listening to key so that the space or enter bar doesn't stop the program.
Extend events sample to include animation with key events.
87a617d to
672617e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend events sample to include animation with key events. While testing
this sample it became obvious that the cmd+enter shortcut to start a
program should remove focus from the editor so that key events get
registered, fixed.
Thanks @fcostin for the idea!