mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-25 09:01:07 -05:00
Merge pull request #1831 from apple502j/stop-ask
Clear ask bubble when stopForTarget
This commit is contained in:
commit
c5284469d3
2 changed files with 4 additions and 3 deletions
|
@ -143,6 +143,7 @@ class Scratch3SensingBlocks {
|
||||||
));
|
));
|
||||||
|
|
||||||
if (currentlyAsking) {
|
if (currentlyAsking) {
|
||||||
|
this.runtime.emit('SAY', stopTarget, 'say', '');
|
||||||
if (this._questionList.length > 0) {
|
if (this._questionList.length > 0) {
|
||||||
this._askNextQuestion();
|
this._askNextQuestion();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -67,7 +67,7 @@ test('ask and stop all dismisses question', t => {
|
||||||
test('ask and stop other scripts dismisses if it is the last question', t => {
|
test('ask and stop other scripts dismisses if it is the last question', t => {
|
||||||
const rt = new Runtime();
|
const rt = new Runtime();
|
||||||
const s = new Sensing(rt);
|
const s = new Sensing(rt);
|
||||||
const util = {target: {visible: false, sprite: {}}, thread: {}};
|
const util = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}};
|
||||||
|
|
||||||
const expectedQuestion = 'a question';
|
const expectedQuestion = 'a question';
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@ test('ask and stop other scripts dismisses if it is the last question', t => {
|
||||||
test('ask and stop other scripts asks next question', t => {
|
test('ask and stop other scripts asks next question', t => {
|
||||||
const rt = new Runtime();
|
const rt = new Runtime();
|
||||||
const s = new Sensing(rt);
|
const s = new Sensing(rt);
|
||||||
const util = {target: {visible: false, sprite: {}}, thread: {}};
|
const util = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}};
|
||||||
const util2 = {target: {visible: false, sprite: {}}, thread: {}};
|
const util2 = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}};
|
||||||
|
|
||||||
const expectedQuestion = 'a question';
|
const expectedQuestion = 'a question';
|
||||||
const nextQuestion = 'a followup';
|
const nextQuestion = 'a followup';
|
||||||
|
|
Loading…
Reference in a new issue