added speech-balloon-value-association support for ASK menu items

snap8
Jens Mönig 2022-04-04 14:24:14 +02:00
rodzic b60889344c
commit 9e426a685b
3 zmienionych plików z 17 dodań i 16 usunięć

Wyświetl plik

@ -31,6 +31,9 @@
* **Translation Updates:** * **Translation Updates:**
* German * German
### 2022-04-04
* objects: added speech-balloon-value-association support for ASK menu items
### 2022-04-03 ### 2022-04-03
* objects: added shortcut support for ASK menu items * objects: added shortcut support for ASK menu items

Wyświetl plik

@ -18,7 +18,7 @@
<script src="src/widgets.js?version=2021-17-09"></script> <script src="src/widgets.js?version=2021-17-09"></script>
<script src="src/blocks.js?version=2022-03-31"></script> <script src="src/blocks.js?version=2022-03-31"></script>
<script src="src/threads.js?version=2022-03-31"></script> <script src="src/threads.js?version=2022-03-31"></script>
<script src="src/objects.js?version=2022-04-03"></script> <script src="src/objects.js?version=2022-04-04"></script>
<script src="src/scenes.js?version=2022-03-03"></script> <script src="src/scenes.js?version=2022-03-03"></script>
<script src="src/gui.js?version=2022-03-17"></script> <script src="src/gui.js?version=2022-03-17"></script>
<script src="src/paint.js?version=2021-07-05"></script> <script src="src/paint.js?version=2021-07-05"></script>

Wyświetl plik

@ -93,7 +93,7 @@ BlockVisibilityDialogMorph, CostumeIconMorph, SoundIconMorph, MenuItemMorph*/
/*jshint esversion: 6*/ /*jshint esversion: 6*/
modules.objects = '2022-April-03'; modules.objects = '2022-April-04';
var SpriteMorph; var SpriteMorph;
var StageMorph; var StageMorph;
@ -12885,33 +12885,29 @@ StagePickerMorph.prototype.init = function (options) {
isLine = each.isEmpty(); isLine = each.isEmpty();
if (this.isLeftQuote(each)) { if (this.isLeftQuote(each)) {
value = each.at(1); value = each.at(1);
key = new SpriteBubbleMorph( key = new SpriteBubbleMorph(value);
value,
null, // stage,
null, // isThought,
null // isQuestion
);
} else if (this.isRightQuote(each)) { } else if (this.isRightQuote(each)) {
value = each.at(2); value = each.at(2);
key = new SpriteBubbleMorph( key = new SpriteBubbleMorph(value);
value,
null, // stage,
false, // isThought,
null // isQuestion
);
key.isPointingRight = false; key.isPointingRight = false;
} else { } else {
key = each.at(1); key = each.at(1);
if (key instanceof List) { if (key instanceof List) {
if (this.isShortcut(key)) { if (this.isLeftQuote(key)) {
key = new SpriteBubbleMorph(key.at(1));
} else if (this.isRightQuote(key)) {
key = new SpriteBubbleMorph(key.at(2));
key.isPointingRight = false;
} else if (this.isShortcut(key)) {
this.addPair( this.addPair(
key.at(1).toString(), key.at(1).toString(),
each.at(2), each.at(2),
key.at(2).toString() key.at(2).toString()
); );
return; return;
} else {
key = key.itemsArray();
} }
key = key.itemsArray();
} }
value = each.at(2); value = each.at(2);
} }
@ -12960,6 +12956,8 @@ StagePickerMorph.prototype.isShortcut = function (key) {
var types = ['text', 'number']; var types = ['text', 'number'];
return key instanceof List && return key instanceof List &&
(key.length() === 2) && (key.length() === 2) &&
key.at(1) &&
key.at(2) &&
contains(types, Process.prototype.reportTypeOf(key.at(1))) && contains(types, Process.prototype.reportTypeOf(key.at(1))) &&
contains(types, Process.prototype.reportTypeOf(key.at(2))); contains(types, Process.prototype.reportTypeOf(key.at(2)));
}; };