"color" input

Can you add this label part to Snap?

JS Code:

TextSlotMorph.prototype.labelParts['%color'] = {
type: "multi",
slots: "%n",
min: 1,
max: 4,
defaults: 2
}

Example:
"color" block 1 input
"color" block
"color" block max inputs

For making custom blocks that need color inputs without the color picker.
(Please add it to the custom block inputs menu)

Can't you just use the multi-number input as is?

that's what I thought

I wanted to limit the number of inputs.

I guesss I will do it myself.

Eventually, this will be possible for any type of input, and even for groups of inputs. Until then, I don't think you will be able to use specific cases. If you care enough, you can replace another input with a %color in the XML.

I know, but people would have to run the JS code above before loading the project.

Oh, I see. I though it was an input in primitive blocks. Just use %n%mult then.

I think it's %mult%n.

That's the right one.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.