"Create own block" dropdown list
id: 18928
category: Suggestions
posts: 333
Me_Tis
loading
My suggestion is simple: that when you create your own block, along with boolean, string and number input, you were allowed to do a dropdown list like this:
You would create it like this:
https://www.dropbox.com/s/4t3sqpemud3e0y1/Dropdown%20list.png?dl=0
I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?
PS this can be likened to enums in other programming languages.
UPDATE:
I know that this is possible through workarounds, but the entire premise behind scratch is to make programming easy, so a workaround isn't really a solution.
I am suggesting this because I think it will make some things easier, whereas using the workaround makes things harder, and may be intimidating to new programmers.
define move [direcion]▾
if <(direction)=[up]>
point in direction (0 v)
move (10) steps
end
if <(direction)=[down]>
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v]
You would create it like this:
https://www.dropbox.com/s/4t3sqpemud3e0y1/Dropdown%20list.png?dl=0
I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?
PS this can be likened to enums in other programming languages.
UPDATE:
I know that this is possible through workarounds, but the entire premise behind scratch is to make programming easy, so a workaround isn't really a solution.
I am suggesting this because I think it will make some things easier, whereas using the workaround makes things harder, and may be intimidating to new programmers.
PullJosh
loading
Great idea! This was a feature that I always found BYOB (now SNAP) was lacking and needed badly. And now scratch needs it too. Support!
DotDash
loading
Support, doesn't seem to be any duplicates, so nice original idea!
cobraguy
loading
Support! Just need to come up with a menu that lets edit the values for the dropdown.
BigBlueBlock
loading
%d They will be added in future! My suggestion is simple: that when you create your own block, along with boolean, string and number input, you were allowed to do a dropdown list like this:define move [direcion]I would find this very useful (though admittedly my example wasn't very useful)
if <(direction)=[up]>
point in direction (0 v)
move (10) steps
end
if <(direction)=[down]>
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v]
Any suggestions, improvements or just support?
epiclyepicepic
loading
I have seen people do it. I can do a number drop down box but thats it!
cked
when random things happen[scratchblocks]
r[/scratchblocks]
do more random things!
chabad360
loading
funny that was a suggestion I bought up a while ago along with the custom blocks being global meaning they can be declared once but used in every sprite.
Deerleg
loading
Support! Good idea!
BYOB is now called SNAP? (off topic) Great idea! This was a feature that I always found BYOB (now SNAP) was lacking and needed badly. And now scratch needs it too. Support!
spgame05
loading
Support!
Yep! BYOB is now called SNAP? (off topic)
derpmeup
loading
Support! There is a way to get hacked custom blocks, but it isn't easy.
TimothyLawyer
loading
Support. Any suggestions, improvements or just support?
The Unicode white down-pointing small triangle (U-25BF) could be used to indicate the dropdown variable.
define move [direction ▿]
if <(direction ▿)=[up]>
point in direction (0 v)
end
if <(direction ▿)=[down]>
point in direction (180 v)
end
move (10) steps
when green flag clicked
move [up v]
move [down v]
c1ff
loading
Yes Yes Yes Yes Yes Yes Yes Yes YES!!!!!!!!!!!!
I supports this cause!
I supports this cause!
say [YES!!!!!] for (inf.) secs
Me_Tis
loading
Yay! Lots of support!!!
Me_Tis
loading
Makes sense… the only thing is that although the input method for a dropdown input would be different it would behave pretty much like a string, so maybe it doesn't need an arrow symbol.. Although if this makes it easier to understand for beginners then I guess so…Support. Any suggestions, improvements or just support?
The Unicode white down-pointing small triangle (U-25BF) could be used to indicate the dropdown variable.define move [direction ▿]
if <(direction ▿)=[up]>
point in direction (0 v)
end
if <(direction ▿)=[down]>
point in direction (180 v)
end
move (10) steps
when green flag clicked
move [up v]
move [down v]
Swampert11
loading
Support!
AonymousGuy
loading
+1.
TimothyLawyer
loading
Makes sense… the only thing is that although the input method for a dropdown input would be different it would behave pretty much like a string, so maybe it doesn't need an arrow symbol.. Although if this makes it easier to understand for beginners then I guess so… The Unicode white down-pointing small triangle (U-25BF) could be used to indicate the dropdown variable.define move [direction ▿]
if <(direction ▿)=[up]>
point in direction (0 v)
end
if <(direction ▿)=[down]>
point in direction (180 v)
end
move (10) steps
when green flag clicked
move [up v]
move [down v]
True.
When I saw your example it helped me to think about how this could be done.
define move [direction]
gave me an expectation of
move [ ] ::custom
//or
move () ::custom
but not
move [down v] ::custom
as the block it would define.
So a new solution occurs to me.
define move [direction] ▾ScratchBlocks doesn't support v for a drop-down menu for the define block.
move [down v] ::custom
So the v is Unicode black down-pointing small triangle (U+25BE).
Clicking on the ▾ in the define block (where it's white) would show a menu of lists.
Select a list and the items of the list become the options in the drop-down menu in the custom block.
A blank list item would produce a non-selectable separator line (the black bar).
A list item of the form (number) string would produce menu options like in the direction block.
Thus, each drop-down menu in a custom block would be defined by a Scratch list.
Easy-peasy
Failord
loading
You can actually hack to do this, (don't ask me how) but the hack doesn't let you do anything with it. There's also the problem of filling up the dropdown, assuming they non-hack implement it. For now, reporters and strings work fien.
If we can get a good, simple way for this to be added, then you have my support.
If we can get a good, simple way for this to be added, then you have my support.
Me_Tis
loading
I think your suggestion is almost perfect. The only thing I disagree with is having the create a block reliant on a scratch list. I was thinking more of a menu similar to the current “create a block” menu - like this:
https://dl.dropboxusercontent.com/u/17754076/Scratch/Dropdown%20list.png
AonymousGuy
loading
Should they maybe be called enumerations, like they are in real programming languages?
Quixotic
loading
LOVE THAT IDEA!
Should definitely be implemented!
Very original!
Should definitely be implemented!
Very original!
PH-zero
loading
Awsome! I definetly support!
Oh, and this came into my mind
Oh, and this came into my mind
define move (direcion = [up v]) //appearently the parser can't recognize the [up v] =)You could add/remove enumerations (list-entrys) by right-clicking on the block and then choose “edit”.
if <direction =[up v]> //the red reporters should be custom-block-colored but i didn't get it to work
point in direction (0 v)
move (10) steps
end
if <direction =[down v]>
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v] //category=custom
Tikolu
loading
There should be
move (up v) //It should be dark purple )=also.
Me_Tis
loading
If it isn't too confusing for beginners… shall I suggest it on the original post? Should they maybe be called enumerations, like they are in real programming languages?
Me_Tis
loading
Another good suggestion… Awsome! I definetly support!
Oh, and this came into my minddefine move (direcion = [up v]) //appearently the parser can't recognize the [up v] =)You could add/remove enumerations (list-entrys) by right-clicking on the block and then choose “edit”.
if <direction =[up v]> //the red reporters should be custom-block-colored but i didn't get it to work
point in direction (0 v)
move (10) steps
end
if <direction =[down v]>
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v] //category=custom
VoltageGames
loading
the workaround is too easy. Do a string where you want the dropdown. Then, in the string on the block, put in the direction, then make the appropriate changes to the definition.
Me_Tis
loading
The whole point of programming languages (especially scratch) is to make programming easy. Using workarounds is annoying. If you wanted to do that kind of thing, you may as well be programming in assembly ( the workaround is too easy. Do a string where you want the dropdown. Then, in the string on the block, put in the direction, then make the appropriate changes to the definition.http://en.wikipedia.org/wiki/Assembly_language)
minirag
loading
I support
The ST should add this!
The ST should add this!
GrannyCookies
loading
Supporrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrt.
1234abcdcba4321
loading
Support
I mean, I wouldn't have suggested this if I didn't like it!
I mean, I wouldn't have suggested this if I didn't like it!
KingOfAwesome58219
loading
Full support
TehCow
loading
Support!
theonlygusti
loading
Support. Any suggestions, improvements or just support?
The Unicode white down-pointing small triangle (U-25BF) could be used to indicate the dropdown variable.define move [direction ▿]
if <(direction ▿)=[up]>
point in direction (0 v)
end
if <(direction ▿)=[down]>
point in direction (180 v)
end
move (10) steps
when green flag clicked
move [up v]
move [down v]
Failord
loading
I have a new idea! You guys are going to hate this! Instead of "move [left v],“ you could make x number of custom blocks like this: ”move left“ ”move right“ move up” move down"
Thotz?
Thotz?
stickfiregames
loading
What if you have 100 variables in your project and you want a custom block to change one? You would need I have a new idea! You guys are going to hate this! Instead of "move [left v],“ you could make x number of custom blocks like this: ”move left“ ”move right“ move up” move down"a lot of custom blocks.
Thotz?
little_kitten
loading
__ __ __ _ __ __
/___ | | |__||__| / \ |__| | |
___/ \_/ | | \__/ | \ | .
pro4life
loading
cool! great Idea!
Prinseskat
loading
Support.
chabad360
loading
im working on a way to get custom menus in JSON, it will take a while and at this point i just started so…
__init__
loading
+1
theonlygusti
loading
I think that there should be pre-defined lists, for instance a list of all variables, or a list of all sprites. Why else would you need it?
stickfiregames
loading
Blocks like I think that there should be pre-defined lists, for instance a list of all variables, or a list of all sprites. Why else would you need it?
set rotation style [left-right v]have dropdowns exclusive to themselves, so it is possible that custom blocks would also need their own.
stop [all v]
RPFluffy
loading
Support, I would love the idea because then we could have multiple outputs in custom blocks!
xela888
loading
THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!! It helps me a ton!!!!!!!!!!!!!!!!!!!!!!
little_kitten
loading
How do you type the dropdown symbol?
TimothyLawyer
loading
Type a space and the letter v (lowercase) in between [ ]. How do you type the dropdown symbol?
choose [item 1 v] :: custom
little_kitten
loading
Thanks!
Xelophelt
loading
This is actually a really good idea. Support.
Me_Tis
loading
sounds good… im working on a way to get custom menus in JSON, it will take a while and at this point i just started so…
hornbeef
loading
how? Support! There is a way to get hacked custom blocks, but it isn't easy.
when green flag clicked
say [tell me pleeeese??:/] for (2) secs