1

I Cloned the repository Scratch-GUI
I did npm install & npm start
Works perfectly in http://localhost:8601/ ,

now,

  • I have to change the text&color of the pre-built block without changing the result(change the color of one = block and change its text from = to equal)

  • I want to create/add a new block

How to do it (where to change/add)

( I have only setuped scratch-GUI ,I didn't setup scratch VM/scratchblocks because without that itself the localhost is working )

Neptotech -vishnu
  • 1,096
  • 8
  • 23

1 Answers1

1

scratch-blocks, scratch-vm, etc. are already installed when you install scratch-gui. First you need to write the code to be ran when the block is clicked. Define that in node-modules/scratch-vm/src/blocks/scratch3_[the category you want].js. Next you need to define the block in scratch-blocks. To do that navigate to node-modules/scratch-blocks/blocks-vertical/[the category you want].js. And finally you need to add your block to the toolbox. It's in node-modules/scratch-blocks/blocks_vertical/default_toolbox.js.

Fatemeh Sangin
  • 558
  • 1
  • 4
  • 19
CrossScar
  • 11
  • 1