【问题标题】:How to change the color of the extension device blocks in Scratch 3.0?Scratch 3.0中如何更改扩展设备块的颜色?
【发布时间】:2021-01-22 03:40:19
【问题描述】:

我正在修改 Scratch 3.0。

我已经克隆了scratch-guiscratch-blocksscratch-vm,并添加了我的新扩展设备。现在我想更改我的扩展设备块的颜色,但我没有找到任何方法来更改Scratch 3.0 中的扩展块的颜色。

3.0有什么办法可以改变扩展设备块的颜色吗?

【问题讨论】:

    标签: javascript node.js reactjs blockly mit-scratch


    【解决方案1】:

    scratch-vm Documentation

                // Core extensions only: override the default extension block colors.
            color1: '#FF8C1A',
            color2: '#DB6E00',
    

    在 getInfo() 中应用这个 color1 和 color2

    class SomeBlocks {
    constructor (runtime) {
    
        this.runtime = runtime;
    }
    
    getInfo () {
        return {
           
            id: 'someBlocks',
    
            // Core extensions only: override the default extension block colors.
            color1: '#FF8C1A',
            color2: '#DB6E00',
            .
            . 
            .
            .
            .
            .
            .
    

    【讨论】:

      【解决方案2】:

      为什么不使用 ScratchAddons?你可以在这里查看他们的网站:https://scratchaddons.com/

      寻找“可自定义的块颜色”选项。

      【讨论】:

        猜你喜欢
        • 2023-01-04
        • 1970-01-01
        • 1970-01-01
        • 2015-02-03
        • 1970-01-01
        • 1970-01-01
        • 2015-10-01
        • 1970-01-01
        • 2017-01-08
        相关资源
        最近更新 更多