{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js/issues/834","labels_url":"https://api.github.com/repos/processing/p5.js/issues/834/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/834/comments","events_url":"https://api.github.com/repos/processing/p5.js/issues/834/events","html_url":"https://github.com/processing/p5.js/pull/834","id":97816585,"number":834,"title":"Inputs (creates createCheckbox(), createDropdown())","user":{"login":"futuremarc","id":8646752,"avatar_url":"https://avatars.githubusercontent.com/u/8646752?v=3","gravatar_id":"","url":"https://api.github.com/users/futuremarc","html_url":"https://github.com/futuremarc","followers_url":"https://api.github.com/users/futuremarc/followers","following_url":"https://api.github.com/users/futuremarc/following{/other_user}","gists_url":"https://api.github.com/users/futuremarc/gists{/gist_id}","starred_url":"https://api.github.com/users/futuremarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuremarc/subscriptions","organizations_url":"https://api.github.com/users/futuremarc/orgs","repos_url":"https://api.github.com/users/futuremarc/repos","events_url":"https://api.github.com/users/futuremarc/events{/privacy}","received_events_url":"https://api.github.com/users/futuremarc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-28T22:39:11Z","updated_at":"2015-07-29T20:14:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/processing/p5.js/pulls/834","html_url":"https://github.com/processing/p5.js/pull/834","diff_url":"https://github.com/processing/p5.js/pull/834.diff","patch_url":"https://github.com/processing/p5.js/pull/834.patch"},"body":"This adds `createCheckbox()`, which takes a label and a `true/false`value as params if checked or not by default. `.checked()` can be called to return a `true/false` value whether the box is checked.\r\n\r\nIt also adds `createDropdown()` which supports a multiple selection menu if `true` is passed as param. `.option()` sets the name and value respectively with arguments, `selected()` with no args returns the value selected in a dropdown (or an array of values if multiple selection menu is true). If `selected()` is given an arg it can select an item based on the value, however this isn't supported for a multiple selection dropdown.\r\n\r\n\r\nI think something we need to consider is wrapping `onchange` at the p5.Element level... `mousePressed()` works fine for things like a button or a checkbox even, but when it comes to a dropdown menu it doesn't make sense b/c it fires the event before the option is selected.\r\n\r\n\r\nLet me know what you think"},"comment":{"url":"https://api.github.com/repos/processing/p5.js/issues/comments/126083251","html_url":"https://github.com/processing/p5.js/pull/834#issuecomment-126083251","issue_url":"https://api.github.com/repos/processing/p5.js/issues/834","id":126083251,"user":{"login":"lmccart","id":191056,"avatar_url":"https://avatars.githubusercontent.com/u/191056?v=3","gravatar_id":"","url":"https://api.github.com/users/lmccart","html_url":"https://github.com/lmccart","followers_url":"https://api.github.com/users/lmccart/followers","following_url":"https://api.github.com/users/lmccart/following{/other_user}","gists_url":"https://api.github.com/users/lmccart/gists{/gist_id}","starred_url":"https://api.github.com/users/lmccart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmccart/subscriptions","organizations_url":"https://api.github.com/users/lmccart/orgs","repos_url":"https://api.github.com/users/lmccart/repos","events_url":"https://api.github.com/users/lmccart/events{/privacy}","received_events_url":"https://api.github.com/users/lmccart/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T20:14:46Z","updated_at":"2015-07-29T20:14:46Z","body":"ahh I didn't read closely. I think your intuition is right. `|` should mean \"or\", `/` makes sense for is both! I'm sorry!"}}