mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Merge pull request #950 from ericrosenbaum/bugfix/import-music-menus
Fix music extension menu import
This commit is contained in:
commit
981fc57a43
3 changed files with 14 additions and 6 deletions
|
@ -464,7 +464,7 @@ class Scratch3MusicBlocks {
|
||||||
arguments: {
|
arguments: {
|
||||||
DRUM: {
|
DRUM: {
|
||||||
type: ArgumentType.NUMBER,
|
type: ArgumentType.NUMBER,
|
||||||
menu: 'drums',
|
menu: 'DRUM',
|
||||||
defaultValue: 1
|
defaultValue: 1
|
||||||
},
|
},
|
||||||
BEATS: {
|
BEATS: {
|
||||||
|
@ -506,7 +506,7 @@ class Scratch3MusicBlocks {
|
||||||
arguments: {
|
arguments: {
|
||||||
INSTRUMENT: {
|
INSTRUMENT: {
|
||||||
type: ArgumentType.NUMBER,
|
type: ArgumentType.NUMBER,
|
||||||
menu: 'instruments',
|
menu: 'INSTRUMENT',
|
||||||
defaultValue: 1
|
defaultValue: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -540,8 +540,8 @@ class Scratch3MusicBlocks {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menus: {
|
menus: {
|
||||||
drums: this._buildMenu(this.DRUM_INFO),
|
DRUM: this._buildMenu(this.DRUM_INFO),
|
||||||
instruments: this._buildMenu(this.INSTRUMENT_INFO)
|
INSTRUMENT: this._buildMenu(this.INSTRUMENT_INFO)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -533,6 +533,14 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension
|
||||||
if (shadowObscured) {
|
if (shadowObscured) {
|
||||||
fieldValue = '';
|
fieldValue = '';
|
||||||
}
|
}
|
||||||
|
} else if (expectedArg.inputOp === 'music.menu.DRUM') {
|
||||||
|
if (shadowObscured) {
|
||||||
|
fieldValue = 1;
|
||||||
|
}
|
||||||
|
} else if (expectedArg.inputOp === 'music.menu.INSTRUMENT') {
|
||||||
|
if (shadowObscured) {
|
||||||
|
fieldValue = 1;
|
||||||
|
}
|
||||||
} else if (shadowObscured) {
|
} else if (shadowObscured) {
|
||||||
// Filled drop-down menu.
|
// Filled drop-down menu.
|
||||||
fieldValue = '';
|
fieldValue = '';
|
||||||
|
|
|
@ -424,7 +424,7 @@ const specMap = {
|
||||||
argMap: [
|
argMap: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
inputOp: 'math_number',
|
inputOp: 'music.menu.DRUM',
|
||||||
inputName: 'DRUM'
|
inputName: 'DRUM'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -464,7 +464,7 @@ const specMap = {
|
||||||
argMap: [
|
argMap: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
inputOp: 'math_number',
|
inputOp: 'music.menu.INSTRUMENT',
|
||||||
inputName: 'INSTRUMENT'
|
inputName: 'INSTRUMENT'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue