Merge branch 'master' into michael/lib-preview

* master:
  add pentrails->costume block to penTrails library
  Add reporters to setrgb library
  Update LEAP library to use menus
  Hide setting for “prefer smooth animations”
  Disabled hover-help for custom blocks
pull/29/head
Michael Ball 2017-01-03 01:55:49 -08:00
commit d26049680d
6 zmienionych plików z 28 dodań i 9 usunięć

15
byob.js
Wyświetl plik

@ -102,13 +102,12 @@ AlignmentMorph, ToggleMorph, InputFieldMorph, ReporterBlockMorph,
StringMorph, nop, newCanvas, radians, BoxMorph, ArrowMorph, PushButtonMorph,
contains, InputSlotMorph, ToggleButtonMorph, IDE_Morph, MenuMorph, copy,
ToggleElementMorph, Morph, fontHeight, StageMorph, SyntaxElementMorph,
SnapSerializer, CommentMorph, localize, CSlotMorph, SpeechBubbleMorph,
MorphicPreferences, SymbolMorph, isNil, CursorMorph, VariableFrame,
WatcherMorph, Variable*/
SnapSerializer, CommentMorph, localize, CSlotMorph, MorphicPreferences,
SymbolMorph, isNil, CursorMorph, VariableFrame, WatcherMorph, Variable*/
// Global stuff ////////////////////////////////////////////////////////
modules.byob = '2016-December-27';
modules.byob = '2016-December-29';
// Declarations
@ -948,6 +947,9 @@ CustomCommandBlockMorph.prototype.deleteBlockDefinition = function () {
// CustomCommandBlockMorph events:
// hover help - commented out for now
/*
CustomCommandBlockMorph.prototype.mouseEnter = function () {
var comment, help;
if (this.isTemplate && this.definition.comment) {
@ -982,6 +984,8 @@ CustomCommandBlockMorph.prototype.popUpbubbleHelp = function (
).popUp(this.world(), this.rightCenter().add(new Point(-8, 0)));
};
*/
// CustomCommandBlockMorph relabelling
CustomCommandBlockMorph.prototype.relabel = function (alternatives) {
@ -1127,11 +1131,14 @@ CustomReporterBlockMorph.prototype.deleteBlockDefinition
// CustomReporterBlockMorph events:
// hover help - commented out for now
/*
CustomReporterBlockMorph.prototype.mouseEnter
= CustomCommandBlockMorph.prototype.mouseEnter;
CustomReporterBlockMorph.prototype.mouseLeave
= CustomCommandBlockMorph.prototype.mouseLeave;
*/
// CustomReporterBlockMorph bubble help:

5
gui.js
Wyświetl plik

@ -72,7 +72,7 @@ isRetinaSupported, SliderMorph, Animation*/
// Global stuff ////////////////////////////////////////////////////////
modules.gui = '2016-December-27';
modules.gui = '2016-December-29';
// Declarations
@ -2706,7 +2706,8 @@ IDE_Morph.prototype.settingsMenu = function () {
'toggleVariableFrameRate',
StageMorph.prototype.frameRate,
'uncheck for greater speed\nat variable frame rates',
'check for smooth, predictable\nanimations across computers'
'check for smooth, predictable\nanimations across computers',
true
);
addPreference(
'Flat line ends',

Wyświetl plik

@ -3223,6 +3223,11 @@ http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation
------
* GUI, Threads, Objects, Store: Disable JS-Functions, to protect users from malicious scripts, commented out for now
161229
------
* BYOB: Disabled hover-help for custom blocks (some people find it annoying)
* GUI: Hide setting for “prefer smooth animations” (now - mostly - redundant)
== v4.10 === (in development)

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -1 +1 @@
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="pen trails" type="reporter" category="pen"><header></header><code></code><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list></list><l>var cst = new Costume(&#xD; this.parentThatIsA(StageMorph).trailsCanvas&#xD;);&#xD;cst.shrinkWrap();&#xD;return cst;</l></block><list></list></block></block></script></block-definition><block-definition s="set pen trails to: %&apos;costume&apos;" type="command" category="pen"><header></header><code></code><inputs><input type="%s" readonly="true"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>cst</l></list><l>var stage = this.parentThatIsA(StageMorph);&#xD;stage.trailsCanvas = cst.contents;&#xD;stage.changed();</l></block><list><block var="costume"/></list></block></script></block-definition></blocks>
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="pen trails" type="reporter" category="pen"><header></header><code></code><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list></list><l>var cst = new Costume(&#xD; this.parentThatIsA(StageMorph).trailsCanvas&#xD;);&#xD;cst.shrinkWrap();&#xD;return cst;</l></block><list></list></block></block></script></block-definition><block-definition s="set pen trails to: %&apos;costume&apos;" type="command" category="pen"><header></header><code></code><inputs><input type="%s" readonly="true"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>cst</l></list><l>var stage = this.parentThatIsA(StageMorph);&#xD;stage.trailsCanvas = cst.contents;&#xD;stage.changed();</l></block><list><block var="costume"/></list></block></script></block-definition><block-definition s="make costume named %&apos;name&apos; from pen trail %&apos;trail&apos;" type="command" category="looks"><header></header><code></code><inputs><input type="%s">pen trail</input><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>name</l><l>trail</l></list><l>trail.name = this.newCostumeName(name, null);&#xD;this.addCostume(trail);&#xD;this.wearCostume(trail);</l></block><list><block var="name"/><block var="trail"/></list></block></script></block-definition></blocks>

Wyświetl plik

@ -1 +1 @@
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="set pen color to r: %&apos;r&apos; g: %&apos;g&apos; b: %&apos;b&apos;" type="command" category="pen"><header></header><code></code><inputs><input type="%n">255</input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>r</l><l>g</l><l>b</l></list><l>this.setColor(new Color(r, g, b));</l></block><list><block var="r"/><block var="g"/><block var="b"/></list></block></script></block-definition><block-definition s="set pen color to h: %&apos;h&apos; s: %&apos;s&apos; v: %&apos;v&apos;" type="command" category="pen"><header></header><code></code><inputs><input type="%n">0.3</input><input type="%n">0.7</input><input type="%n">0.6</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>h</l><l>s</l><l>v</l></list><l>var col = new Color();&#xD;col.set_hsv(h, s, v);&#xD;this.setColor(col);</l></block><list><block var="h"/><block var="s"/><block var="v"/></list></block></script></block-definition></blocks>
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="set pen color to r: %&apos;r&apos; g: %&apos;g&apos; b: %&apos;b&apos;" type="command" category="pen"><header></header><code></code><inputs><input type="%n">255</input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>r</l><l>g</l><l>b</l></list><l>this.setColor(new Color(r, g, b));</l></block><list><block var="r"/><block var="g"/><block var="b"/></list></block></script></block-definition><block-definition s="set pen color to h: %&apos;h&apos; s: %&apos;s&apos; v: %&apos;v&apos;" type="command" category="pen"><header></header><code></code><inputs><input type="%n">0.3</input><input type="%n">0.7</input><input type="%n">0.6</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>h</l><l>s</l><l>v</l></list><l>var col = new Color();&#xD;col.set_hsv(h, s, v);&#xD;this.setColor(col);</l></block><list><block var="h"/><block var="s"/><block var="v"/></list></block></script></block-definition><block-definition s="RGB color" type="reporter" category="pen"><header></header><code></code><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l></l></list><l>return new List([this.color.r, this.color.g, this.color.b]);</l></block><list></list></block></block></script></block-definition><block-definition s="HSV color" type="reporter" category="pen"><header></header><code></code><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l></l></list><l>return new List(this.color.hsv());</l></block><list></list></block></block></script></block-definition></blocks>