moved "stage width" and "stage height" into attribute menu of the OF block for the stage

pull/89/head
jmoenig 2019-04-04 15:16:13 +02:00
rodzic 2958b2d24e
commit 7bf45e0821
4 zmienionych plików z 13 dodań i 10 usunięć

Wyświetl plik

@ -20,7 +20,7 @@
* added "neg" selector to monadic function reporter in "Operators" category
* added "log2" 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
* added "width" and "height" as attribute selectors of the OF primitive for the stage
* 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
@ -60,6 +60,7 @@
* Objects, Threads: new "play frequency" commands in the Sounds category
* Objects, Store: renamed "pan left/right" to "balance"
* updated German translation
* moved "stage width" and "stage height" into attribute menu of the OF block for the stage
### 2019-04-03
* Objects, Threads: Safari compatibility tweaks (only use StereoPanner if available)

Wyświetl plik

@ -6,7 +6,7 @@
<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-04-02"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-04-04"></script>
<script type="text/javascript" src="src/threads.js?version=2019-04-04"></script>
<script type="text/javascript" src="src/objects.js?version=2019-04-04"></script>
<script type="text/javascript" src="src/gui.js?version=2019-03-25"></script>

Wyświetl plik

@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2019-April-02';
modules.blocks = '2019-April-04';
var SyntaxElementMorph;
var BlockMorph;
@ -8790,8 +8790,6 @@ 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'];
@ -8846,7 +8844,9 @@ InputSlotMorph.prototype.attributesMenu = function () {
} else { // the stage
dict = {
'costume #' : ['costume #'],
'costume name' : ['costume name']
'costume name' : ['costume name'],
'width': ['width'],
'height': ['height']
};
}
varNames = obj.variables.names();

Wyświetl plik

@ -3611,6 +3611,12 @@ Process.prototype.reportAttributeOf = function (attribute, name) {
: localize('Empty');
case 'size':
return thatObj.getScale ? thatObj.getScale() : '';
case 'width':
this.assertType(thatObj, 'stage');
return thatObj.dimensions.x;
case 'height':
this.assertType(thatObj, 'stage');
return thatObj.dimensions.y;
}
}
}
@ -3691,10 +3697,6 @@ 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':