Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added p5.MediaElement.stop example #2237

Merged

Conversation

bomoko
Copy link
Contributor

@bomoko bomoko commented Oct 3, 2017

Partially addresses #1954 - adds example for p5.MediaElement.stop.

* //above more readable.
* function setMessageAndBackground(message, backgroundColor) {
* background(backgroundColor);
* textAlign(CENTER);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't these two lines get set in setup() then the text() line could replace the setMessageAndBackground() call in the mousClicked() function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lmccart

I had the setMessageAndBackground() function in order to try simplify the repeated setting of the background and text. To be honest, I was worried about it (which is why it had that comment preamble about readability).

What I didn't consider was just not changing the background from light to dark gray. I've done that now and have pulled out the setMessageAndBackground() function.
I think it's better as an example now.

Thanks so much for the feedback!

@lmccart lmccart merged commit e637fb6 into processing:master Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants