File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
addons/block_code/ui/picker/categories Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -503,6 +503,25 @@ static func get_general_blocks() -> Array[Block]:
503503 b .category = "Sounds"
504504 block_list .append (b )
505505
506+ b = BLOCKS ["statement_block" ].instantiate ()
507+ b .block_name = "pause_continue_sound"
508+ b .block_type = Types .BlockType .EXECUTE
509+ b .block_format = "{pause: OPTION} the sound {name: STRING} "
510+ b .statement = (
511+ """
512+ var __sound_node = get_node({name} )
513+ if "{pause} " == "pause":
514+ __sound_node.stream_paused = true
515+ else:
516+ __sound_node.stream_paused = false
517+ """
518+ . dedent ()
519+ )
520+ b .defaults = {"pause" : OptionData .new (["Pause" , "Continue" ])}
521+ b .tooltip_text = "Pause/Continue the audio stream"
522+ b .category = "Sounds"
523+ block_list .append (b )
524+
506525 b = BLOCKS ["statement_block" ].instantiate ()
507526 b .block_name = "stop_sound"
508527 b .block_type = Types .BlockType .EXECUTE
You can’t perform that action at this time.
0 commit comments