Skip to content
Discussion options

You must be logged in to vote

In your extension class, create a constructor object/variable that stores whether the section(s) is/are hidden. Then create a block with type Scratch.BlockType.BUTTON and set its function to toggle that value. By toggling hideFromPallet via a variable/object and then calling Scratch.vm.extensionManager.refreshBlocks you can get the effect you're looking for.

Take a look at this commit for an example; I think I adapted that code from @SharkPool-SP or someone else though so don't credit me for it

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kx1xixit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants