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 "neg" selector to monadic function reporter in "Operators" category
* added "log2" 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 "^" 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 * special context-aware drop-downs for custom blocks
* new "stick to" submenu in the sprite context menu where applicable * new "stick to" submenu in the sprite context menu where applicable
* multi-line and monospaced "code" input slots for custom blocks * 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, Threads: new "play frequency" commands in the Sounds category
* Objects, Store: renamed "pan left/right" to "balance" * Objects, Store: renamed "pan left/right" to "balance"
* updated German translation * updated German translation
* moved "stage width" and "stage height" into attribute menu of the OF block for the stage
### 2019-04-03 ### 2019-04-03
* Objects, Threads: Safari compatibility tweaks (only use StereoPanner if available) * 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"> <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/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/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/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/objects.js?version=2019-04-04"></script>
<script type="text/javascript" src="src/gui.js?version=2019-03-25"></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 //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2019-April-02'; modules.blocks = '2019-April-04';
var SyntaxElementMorph; var SyntaxElementMorph;
var BlockMorph; var BlockMorph;
@ -8790,8 +8790,6 @@ InputSlotMorph.prototype.gettablesMenu = function () {
dict.anchor = ['anchor']; dict.anchor = ['anchor'];
} }
dict.stage = ['stage']; dict.stage = ['stage'];
dict['stage width'] = ['stage width'];
dict['stage height'] = ['stage height'];
if (StageMorph.prototype.enableInheritance) { if (StageMorph.prototype.enableInheritance) {
dict.children = ['children']; dict.children = ['children'];
dict.parent = ['parent']; dict.parent = ['parent'];
@ -8846,7 +8844,9 @@ InputSlotMorph.prototype.attributesMenu = function () {
} else { // the stage } else { // the stage
dict = { dict = {
'costume #' : ['costume #'], 'costume #' : ['costume #'],
'costume name' : ['costume name'] 'costume name' : ['costume name'],
'width': ['width'],
'height': ['height']
}; };
} }
varNames = obj.variables.names(); varNames = obj.variables.names();

Wyświetl plik

@ -3611,6 +3611,12 @@ Process.prototype.reportAttributeOf = function (attribute, name) {
: localize('Empty'); : localize('Empty');
case 'size': case 'size':
return thatObj.getScale ? thatObj.getScale() : ''; 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; return thisObj.name;
case 'stage': case 'stage':
return thisObj.parentThatIsA(StageMorph); return thisObj.parentThatIsA(StageMorph);
case 'stage width':
return StageMorph.prototype.dimensions.x;
case 'stage height':
return StageMorph.prototype.dimensions.y;
case 'costumes': case 'costumes':
return thisObj.reportCostumes(); return thisObj.reportCostumes();
case 'sounds': case 'sounds':