Discuss Scratch

LP_Play
Scratcher
1000+ posts

"Create own block" dropdown list

Support

pvz_pro
Scratcher
500+ posts

"Create own block" dropdown list

Support!

if you are reading this, ok
TheLibrary-BranchC
Scratcher
73 posts

"Create own block" dropdown list

I think this is too complicated. Also there is a workaround.

Why no support:
It's too complicated. How would you select what's in the dropdown? That pretty much covers the cons.

Workaround:
The workaround is quite simple.

1. Create a new project. Add some lists, and add a block with an input.

2. Add the list's name as the first item of the list. Repeat process for each list.

3. Download the project to your computer!

4. Save it as a .zip. Save as all files.

5. Extract files from the .zip. Do not delete it.

6. Open the folder. You will see a text file called project.json. It has pretty much everything. And text pops up.

7. Keep scrolling until you see the ProcDef command. It should say the custom block's name.

8. See those % things? That is the type. change it to a %m.list. It changes input type to list.

9. Don't forget to save it!

10. Transfer it to the .zip file! Delete the text file in the .zip folder, and drag text file from Extracted folder to .zip file.

11. Import the .zip file into the Scratch editor.

12. The .zip file is in Custom Files. Change file to All Files. Double click it.

13. Congratulations! You did it!

_____________

Conclusion: It works! Congratulations! Adding new list will add new to dropdown menu and deleting a list will remove it from the list.


helloandgoodbye9
Scratcher
1000+ posts

"Create own block" dropdown list

TheLibrary-BranchC wrote:

I think this is too complicated. Also there is a workaround.

Why no support:
It's too complicated. How would you select what's in the dropdown? That pretty much covers the cons.

Workaround:
The workaround is quite simple.

1. Create a new project. Add some lists, and add a block with an input.

2. Add the list's name as the first item of the list. Repeat process for each list.

3. Download the project to your computer!

4. Save it as a .zip. Save as all files.

5. Extract files from the .zip. Do not delete it.

6. Open the folder. You will see a text file called project.json. It has pretty much everything. And text pops up.

7. Keep scrolling until you see the ProcDef command. It should say the custom block's name.

8. See those % things? That is the type. change it to a %m.list. It changes input type to list.

9. Don't forget to save it!

10. Transfer it to the .zip file! Delete the text file in the .zip folder, and drag text file from Extracted folder to .zip file.

11. Import the .zip file into the Scratch editor.

12. The .zip file is in Custom Files. Change file to All Files. Double click it.

13. Congratulations! You did it!

_____________

Conclusion: It works! Congratulations! Adding new list will add new to dropdown menu and deleting a list will remove it from the list.
Thats against the TOU, though.

Last edited by kaj (Tomorrow 25:61:61) ͪͪͪͪͪͪͪͪͪͪ ͣͣͣͣ ͯͯͯͯYes, its above the line)
alexphan
Scratcher
1000+ posts

"Create own block" dropdown list

TheLibrary-BranchC wrote:

I think this is too complicated. Also there is a workaround.

Why no support:
It's too complicated. How would you select what's in the dropdown? That pretty much covers the cons.

How is it complicated? It's just selecting from a list of inputs. When you go into the custom block menu, you can add and delete dropdown items.
That is true, but it requires hacking the project.
You click on the dropdown on the custom block :P

Last edited by alexphan (Aug. 11, 2016 20:19:58)

SuperHal989
Scratcher
88 posts

"Create own block" dropdown list

yes please

SuperHAL989 Prime has awoken!

if <Awoken> then

set [Your health v] to [ 0]
end


Username was destroyed by SuperHAL989 prime
\


he despawned. D:
Sheep_maker
Scratcher
1000+ posts

"Create own block" dropdown list

There should be a way to access the built-in dropdowns (such as the costumes or variables dropdown)

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
JavierR100
Scratcher
500+ posts

"Create own block" dropdown list

Support, i need it so badly.
define add [object ▾] to inventory
if <(object ▾) = [( ͡° ͜ʖ ͡°)]> then
say [( ͡° ͜ʖ ͡°)]
else
add (object ▾) to [inventory v]
end
when gf clicked
add [lenny v] to inventory

My customs Blocks on “Snap!” || search in google HN54FyF4KW27o*YWAD94qjEMLV62+]59 to find all my posts. || “Fantasy Tank Builder” Topic || Diep.io | Official Thread || Geometry Dash name account: "JavierR100". || Geometry Dash Official Topic

Actually, [B]en is my legal name!- Pen, BFB 5

Sorry, I'm gone to roblox now, so Im not able to reply anymore!

space_elephant
Scratcher
500+ posts

"Create own block" dropdown list

BigBlueBlock wrote:

Me_Tis wrote:

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]
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]
I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?
%d They will be added in future!

TimothyLawyer wrote:

Me_Tis wrote:

TimothyLawyer wrote:

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]
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…

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] ▾ 






move [down v] ::custom
ScratchBlocks doesn't support v for a drop-down menu for the define block.

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

what if you want a list of list names?

red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
Me_Tis
Scratcher
100+ posts

"Create own block" dropdown list

space_elephant wrote:

what if you want a list of list names?
You would have to declare the list of names manually as in here:
https://dl.dropboxusercontent.com/u/17754076/Scratch/Dropdown%20list.png

It can't be tied to a scratch list as then if the list changes, some items that you have suggested may become invalid if the item in the list is removed.

Last edited by Me_Tis (Sept. 1, 2016 14:51:41)


See my 3D project or my masterpiece: Brain-Twist 3
shd02
Scratcher
100+ posts

"Create own block" dropdown list

How would having the drop-down be different from this?
define move [direction]
if <(direction)=[up]> :: control
point in direction (0 v)
move (10) steps
end
if <(direction)=[down]> :: control
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down]

The only benefit of having the drop-down would be that project creator doesn't need to remember all of the options for the string. Usually, there aren't many options and all of the options are related. I don't support because it takes some work to add this feature and it is not useful enough.
Lamby777
Scratcher
14 posts

"Create own block" dropdown list

You know %m.stop makes a list of stop dropdowns? Tinker with it. I don't really know about it.

when green flag clicked
forever
if <[Scratch v] contains [Anything Undertale, EarthBound, Smash Bros, Minecraft, Clash Royale, or Geometry Dash related] ?> then
play sound [Yay v]
say [Yay!] for (2) secs
end
end

Join Team NK!
https://curse.com/invite/CwyzA7czpEixQbz9i7OI7A
We play all the games that were written in the script above!
mrbumppo
Scratcher
500+ posts

"Create own block" dropdown list

Support!

mrbumppo
The Internet is a weird place, so don't question it.




Scratch_Mapping
Scratcher
100+ posts

"Create own block" dropdown list

No support, too specific as this:
define(custom reporter::custom)
...

 :: obsolete
:: #FFFFFF
:: pen
AdamTRei_Dev
Scratcher
60 posts

"Create own block" dropdown list

support!

No forum post is complete without a smiley face, so if I forgot to put one above here is one now
"I reject your reality and substitute my own." -Adam Savage - MythBusters

"To kill someone to save the world… is that really the right thing to do?“ - Silver the Hedgehog
Creativity is Intelligence having Fun" -Albert Einstien
tomergan
Scratcher
31 posts

"Create own block" dropdown list

Support

(((((((:]::red)::variables)::control reporter)::operators reporter)::sensing reporter)::motion reporter)::looks reporter) // This is rainbow, a happy creature.

Write this in google to find all of my posts, and don't mind this word => wrote:

ajfirkgndoqpruthfmbndhfgdtriux
cs69170
Scratcher
61 posts

"Create own block" dropdown list

Charles12310
Scratcher
1000+ posts

"Create own block" dropdown list

I am trying to find out what a custom dropdown interface would look like.

Scratch_Mapping wrote:

No support, too specific as this:
define(custom reporter::custom)
...
Please prove it.


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
mr-scratch-cat
Scratcher
500+ posts

"Create own block" dropdown list

Support. Having to hack the Scratch Editor just to get a tasty dropdown list is a major inconvenience.

Botcho_Otkho
Scratcher
1000+ posts

"Create own block" dropdown list

Support. People that works a lot with custom blocks (like me) think that it's a feature that Scratch needs. You need this if you're making a block like this
set lang to [French v]::custom
custom block,for example

I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo

Powered by DjangoBB