Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add branchIconURI #174

Merged
merged 3 commits into from
Dec 22, 2023
Merged

Conversation

CubesterYT
Copy link

@CubesterYT CubesterYT commented Dec 17, 2023

Proposed Changes

Adds a new option to blocks called branchIcon. This option allows you to add a custom branch icon to a block. This does not have to strictly be a Scratch.BlockType.LOOP Block, which makes it all the better. Should work flawlessly with data uri's.

Reason for Changes

I added this option because it'll be really useful to have custom branch indications, and also use it in normal blocks as well to indicate anything else.

Test Coverage

Tried building my own gui, but my node version is too new. So I could not test this, but it should still easily work.

Edit

Example

blocks: [
          {
            opcode: "block",
            text: "block: [ARGUMENT]",
            blockType: Scratch.BlockType.LOOP, // Can be any other block, too, which is fire
            branchIcon: // This is the new option I'm adding. You can specify a data uri here.
            arguments: {
              ARGUMENT: {
                type: Scratch.ArgumentType.STRING
              }
            }
          }
        ],

Potential Changes

Might change it from it's else if state and separate it to it's own if statement if we want to make the branchIcon option also work on Scratch.BlockType.REPORTER and Scratch.BlockType.BOOLEAN, but I might not do this.

@yuri-kiss
Copy link

we need this for shrek icons

@GarboMuffin GarboMuffin changed the title Add branchIcon Add branchIconURI Dec 22, 2023
@GarboMuffin GarboMuffin merged commit bd0cf91 into TurboWarp:develop Dec 22, 2023
1 check passed
@LilyMakesThings
Copy link

Today is a good day

@CubesterYT
Copy link
Author

Today is a good day

@LilyMakesThings, for real

@yuri-kiss
Copy link

holy poop, you did it :D

@CubesterYT
Copy link
Author

holy poop, you did it :D

@Ashimee, YEA I DID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants