dms_64
March 1, 2022, 7:11pm
1
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:
For making custom blocks that need color inputs without the color picker.
(Please add it to the custom block inputs menu)
jens
March 1, 2022, 9:18pm
2
Can't you just use the multi-number input as is?
dms_64
March 2, 2022, 6:32pm
4
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.
dms_64
March 2, 2022, 6:38pm
6
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.
system
Closed
April 1, 2022, 10:29pm
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.