new experimental entry for "green flag pressed" in the BROADCAST block's dropdown

when the shift key is pressed
pull/89/head
jmoenig 2019-10-21 11:11:11 +02:00
rodzic bb9d0ebfab
commit dac5bfa6bb
4 zmienionych plików z 23 dodań i 8 usunięć

Wyświetl plik

@ -3,8 +3,9 @@
## in development:
* **New Features:**
* new primitive in "looks": NEW COSTUME from a list of pixels and dimensions, allowing CURRENT
* new primitige in "sound": NEW SOUND from a list of samples
* new primitive in "sound": NEW SOUND from a list of samples
* added selectors for sprites' and the stage's bounding box (LEFT, RIGHT, TOP, BOTTOM) to MY dropdown
* new experimental entry for "green flag pressed" in the BROADCAST block's dropdown when the shift key is pressed
* **Notable Changes:**
* running STOP ALL now also toggles (pauses and resumes) all generic WHEN hat blocks (just like pressing the stop button)
* changed default name for new costumes created with STRETCH etc. to localized 'costume'
@ -14,6 +15,9 @@
* **Translation Updates:**
* German
### 2019-10-21
* blocks, threads: new experimental entry for "green flag pressed" in the BROADCAST block's dropdown when the shift key is pressed
### 2019-10-20
* objects, threads: added "new sound" from list of samples primitive reporter to "sound" category
* objects, threads: added sampling rate input to "new sound" primitive

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-10-16"></script>
<script type="text/javascript" src="src/widgets.js?version=2019-10-16"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-10-18"></script>
<script type="text/javascript" src="src/threads.js?version=2019-10-20"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-10-21"></script>
<script type="text/javascript" src="src/threads.js?version=2019-10-21"></script>
<script type="text/javascript" src="src/objects.js?version=2019-10-20"></script>
<script type="text/javascript" src="src/gui.js?version=2019-10-19"></script>
<script type="text/javascript" src="src/paint.js?version=2019-06-27"></script>

Wyświetl plik

@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2019-October-18';
modules.blocks = '2019-October-21';
var SyntaxElementMorph;
var BlockMorph;
@ -8691,7 +8691,7 @@ InputSlotMorph.prototype.menuFromDict = function (
noEmptyOption,
enableKeyboard)
{
var key, dial,
var key, dial, flag,
myself = this,
menu = new MenuMorph(
this.userSetContents,
@ -8733,6 +8733,12 @@ InputSlotMorph.prototype.menuFromDict = function (
menu.addLine();
menu.items.push(dial);
menu.addLine();
} else if (key === '__shout__go__') {
// show the green flag symbol
flag = new SymbolMorph('flag');
flag.size = this.fontSize * 1.5;
flag.setColor(new Color(0, 200, 0));
menu.addItem(flag, ['__shout__go__']);
} else if (choices[key] instanceof Object &&
!(choices[key] instanceof Array) &&
(typeof choices[key] !== 'function')) {
@ -8760,6 +8766,9 @@ InputSlotMorph.prototype.messagesMenu = function () {
allNames.forEach(function (name) {
dict[name] = name;
});
if (this.world().currentKey === 16) { // shift
dict.__shout__go__ = ['__shout__go__'];
}
if (allNames.length > 0) {
dict['~'] = null;
}
@ -8791,7 +8800,9 @@ InputSlotMorph.prototype.messagesReceivedMenu = function () {
}
});
allNames.forEach(function (name) {
dict[name] = name;
if (name !== '__shout__go__') {
dict[name] = name;
}
});
dict['~'] = null;
dict['new...'] = function () {

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
TableFrameMorph, ColorSlotMorph, isSnapObject, Map, newCanvas, Symbol*/
modules.threads = '2019-October-20';
modules.threads = '2019-October-21';
var ThreadManager;
var Process;
@ -3100,7 +3100,7 @@ Process.prototype.doBroadcast = function (message) {
var stage = this.homeContext.receiver.parentThatIsA(StageMorph),
thisObj,
msg = message,
msg = this.inputOption(message),
trg,
rcvrs,
myself = this,