added "stage width" and "stage height" as gettable attributes to MY

pull/89/head
jmoenig 2019-03-31 13:20:39 +02:00
rodzic b820ccdd5e
commit dd59563f00
4 zmienionych plików z 15 dodań i 5 usunięć

Wyświetl plik

@ -16,6 +16,7 @@
* selectors for changing and querying "draggable" and "rotation style" settings
* added "neg" selector to monadic function reporter in "Operators" category
* added "^" reporter (power of) in the Operators category
* added "stage width" and "stage height" as gettable selectors of the MY primitive
* special context-aware drop-downs for custom blocks
* new "stick to" submenu in the sprite context menu where applicable
* multi-line and monospaced "code" input slots for custom blocks
@ -52,6 +53,9 @@
* German
* French
### 2019-03-31
* Blocks, Threads: added "stage width" and "stage height" as gettable attributes to MY
### 2019-03-30
* Objects: support multi-channel live-audio scripting
* Threads, Objects: added JIT-compilation to live-audio scripting

Wyświetl plik

@ -6,8 +6,8 @@
<link rel="shortcut icon" href="src/favicon.ico">
<script type="text/javascript" src="src/morphic.js?version=2019-02-07"></script>
<script type="text/javascript" src="src/widgets.js?version=2018-10-02"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-03-28"></script>
<script type="text/javascript" src="src/threads.js?version=2019-03-30"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-03-31"></script>
<script type="text/javascript" src="src/threads.js?version=2019-03-31"></script>
<script type="text/javascript" src="src/objects.js?version=2019-03-30"></script>
<script type="text/javascript" src="src/gui.js?version=2019-03-25"></script>
<script type="text/javascript" src="src/paint.js?version=2019-02-22"></script>

Wyświetl plik

@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2019-March-28';
modules.blocks = '2019-March-31';
var SyntaxElementMorph;
var BlockMorph;
@ -8789,6 +8789,8 @@ InputSlotMorph.prototype.gettablesMenu = function () {
dict.anchor = ['anchor'];
}
dict.stage = ['stage'];
dict['stage width'] = ['stage width'];
dict['stage height'] = ['stage height'];
if (StageMorph.prototype.enableInheritance) {
dict.children = ['children'];
dict.parent = ['parent'];

Wyświetl plik

@ -62,7 +62,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
TableFrameMorph, ColorSlotMorph, isSnapObject, Map*/
modules.threads = '2019-March-30';
modules.threads = '2019-March-31';
var ThreadManager;
var Process;
@ -3615,7 +3615,7 @@ Process.prototype.reportAttributeOf = function (attribute, name) {
};
Process.prototype.reportGet = function (query) {
// experimental, answer a reference to a first-class member
// answer a reference to a first-class member
// or a list of first-class members
var thisObj = this.blockReceiver(),
neighborhood,
@ -3688,6 +3688,10 @@ Process.prototype.reportGet = function (query) {
return thisObj.name;
case 'stage':
return thisObj.parentThatIsA(StageMorph);
case 'stage width':
return StageMorph.prototype.dimensions.x;
case 'stage height':
return StageMorph.prototype.dimensions.y;
case 'costumes':
return thisObj.reportCostumes();
case 'sounds':