From 1fbf58bf76dc879a1874e14771f0ba7a978a13fa Mon Sep 17 00:00:00 2001 From: Thomas Sparks Date: Tue, 13 Jun 2023 09:46:28 -0700 Subject: [PATCH] Remove duplicated melody block. Depends on additional toolbox parent parameter-setting behavior that is not yet implemented in pxt --- libs/core/music.ts | 3 ++- libs/core/playable.ts | 12 +----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/libs/core/music.ts b/libs/core/music.ts index a10c01a2..71d63937 100644 --- a/libs/core/music.ts +++ b/libs/core/music.ts @@ -338,8 +338,9 @@ namespace music { */ //% weight=60 help=music/builtin-melody //% blockId=device_builtin_melody_playable block="melody $melody" - //% toolboxParent=music_playable_play_default_bkg + //% toolboxParent=music_playable_play //% toolboxParentArgument=toPlay + //% toolboxParent.playbackMode.defl=music.PlaybackMode.InBackground //% duplicateShadowOnDrag //% group="Melody Advanced" export function builtInPlayableMelody(melody: Melodies): StringArrayPlayable { diff --git a/libs/core/playable.ts b/libs/core/playable.ts index a918977c..a9b2e42f 100644 --- a/libs/core/playable.ts +++ b/libs/core/playable.ts @@ -79,6 +79,7 @@ namespace music { //% blockId="music_playable_play" //% block="play $toPlay $playbackMode" //% toPlay.shadow=music_string_playable + //% playbackMode.defl=music.PlaybackMode.LoopingInBackground //% group="Melody" //% help="music/play" //% blockHidden @@ -86,17 +87,6 @@ namespace music { toPlay._play(playbackMode); } - //% blockId="music_playable_play_default_bkg" - //% block="play $toPlay $playbackMode" - //% toPlay.shadow=music_string_playable - //% playbackMode.defl=music.PlaybackMode.InBackground - //% group="Melody" - //% help="music/play" - //% blockHidden - export function _playDefaultBackground(toPlay: Playable, playbackMode: PlaybackMode) { - return play(toPlay, playbackMode); - } - //% blockId="music_string_playable" //% block="melody $melody at tempo $bpm|(bpm)" //% weight=85 blockGap=8