<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=How_to_Make_a_Dropdown_Menu</id>
	<title>How to Make a Dropdown Menu - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=How_to_Make_a_Dropdown_Menu"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Dropdown_Menu&amp;action=history"/>
	<updated>2026-04-09T08:05:42Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Make_a_Dropdown_Menu&amp;diff=1784&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Dropdown_Menu&amp;diff=1784&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:16Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 11:33, 21 июля 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Make_a_Dropdown_Menu&amp;diff=1783&amp;oldid=prev</id>
		<title>scratch&gt;TheTrillion: We do not live during the era of 2.0.</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Dropdown_Menu&amp;diff=1783&amp;oldid=prev"/>
		<updated>2021-07-02T23:26:07Z</updated>

		<summary type="html">&lt;p&gt;We do not live during the era of 2.0.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{about|how to create a dropdown menu in a [[project]]|the block input|Dropdown Menu}}&lt;br /&gt;
[[File:Open-dropdown-menu-full.png|200px|thumb|A full, open dropdown menu.]]Making a dropdown menu can be useful for making an animated selection for a project. These can be any shape, size, or color but the coding is the same. This tutorial will teach &amp;#039;&amp;#039;&amp;#039;how to make a dropdown menu&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
To start, create a sprite. Draw a costume however the dropdown is wanted. Here is an example:&lt;br /&gt;
[[File:Dropdown-closed-image.svg|thumb|left|Example of a closed dropdown menu]]&lt;br /&gt;
Name this costume &amp;quot;closed&amp;quot;.&lt;br /&gt;
Now, duplicate the costume and flip the arrow. Now it should be looking like this:&lt;br /&gt;
[[File:Open-dropdown-menu.svg|thumb|left|The top of an open dropdown menu]]&lt;br /&gt;
Now, make more costumes, each one being an option to choose. Create variables called&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;(position)&amp;lt;/scratchblocks&amp;gt; &lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;(chosen)&amp;lt;/scratchblocks&amp;gt; &lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;(clone #)//make this &amp;quot;for this sprite only&amp;quot;&amp;lt;/scratchblocks&amp;gt; &lt;br /&gt;
Make two custom blocks: &lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;open::custom&amp;lt;/scratchblocks&amp;gt; &amp;lt;scratchblocks&amp;gt;close::custom&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Coding ==&lt;br /&gt;
Make this code:&lt;br /&gt;
{{tip|Experiment with different lengths with gliding. Starting with the height of the costume multiplied by two is recommended. Remember make the number is negative so it goes down. Make sure the values are the same.}}&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [chosen v] to [0]&lt;br /&gt;
set [position v] to [closed]&lt;br /&gt;
go to x:(. . .::grey) y:(. . .::grey) //set to whatever position wanted&lt;br /&gt;
set size to (. . .::grey) % //set to whatever wanted&lt;br /&gt;
switch costume to (closed v)&lt;br /&gt;
forever&lt;br /&gt;
   if &amp;lt;&amp;lt;touching (mouse pointer v)?&amp;gt; and &amp;lt;mouse down?&amp;gt;&amp;gt; then&lt;br /&gt;
      if &amp;lt;(position)=[open]&amp;gt; then&lt;br /&gt;
         close::custom&lt;br /&gt;
         wait until &amp;lt;not &amp;lt;mouse down&amp;gt;&amp;gt;&lt;br /&gt;
      end&lt;br /&gt;
      if &amp;lt;(position)=[closed]&amp;gt; then&lt;br /&gt;
         open::custom&lt;br /&gt;
         wait until &amp;lt;not &amp;lt;mouse down&amp;gt;&amp;gt;&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
define close&lt;br /&gt;
   if &amp;lt;(position)=[open]&amp;gt; then&lt;br /&gt;
      switch costume to (closed v)&lt;br /&gt;
      broadcast (close v)&lt;br /&gt;
   end&lt;br /&gt;
define open&lt;br /&gt;
   if &amp;lt;(position)=[closed]&amp;gt; then&lt;br /&gt;
      switch costume to (open v)&lt;br /&gt;
      set [clone # v] to [0]&lt;br /&gt;
        repeat [3]&lt;br /&gt;
           change [clone # v] by [1]&lt;br /&gt;
           create clone of (myself v)&lt;br /&gt;
        end&lt;br /&gt;
      change [clone # v] by [1]&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
when I start as a clone&lt;br /&gt;
   if &amp;lt;(clone #) = [1]&amp;gt; then&lt;br /&gt;
     switch costume to (option 1 v)&lt;br /&gt;
     glide [0.2] secs to x:(. . .::grey) y:(. . .::grey)//the instructions for what to fill in here are above, marked as a tip&lt;br /&gt;
   else&lt;br /&gt;
      if &amp;lt;(clone #) = [2]&amp;gt; then&lt;br /&gt;
         switch costume to (option 2 v)&lt;br /&gt;
         glide [0.2] secs to x:(. . .::grey) y:(. . .::grey)//the instructions for what to fill in here are above, marked as a tip&lt;br /&gt;
      else&lt;br /&gt;
         if &amp;lt;(clone #) = [3]&amp;gt; then&lt;br /&gt;
            switch costume to (option 3 v)&lt;br /&gt;
            glide [0.2] secs to x:(. . .::grey) y:(. . .::grey)//the instructions for what to fill in here are above, marked as a tip&lt;br /&gt;
         else&lt;br /&gt;
            delete this clone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end   &lt;br /&gt;
set [position v] to [open]&lt;br /&gt;
&lt;br /&gt;
when I receive [close v]&lt;br /&gt;
if &amp;lt;(clone #) = [1]&amp;gt; then&lt;br /&gt;
     glide [0.2] secs to x:(. . .::grey) y:(. . .::grey)//here, set to the original position (the starting position of the sprite)&lt;br /&gt;
     delete this clone&lt;br /&gt;
   else&lt;br /&gt;
      if &amp;lt;(clone #) = [2]&amp;gt; then&lt;br /&gt;
         glide [0.2] secs to x:(. . .::grey) y:(. . .::grey)//here, set to the original position (the starting position of the sprite)&lt;br /&gt;
         delete this clone&lt;br /&gt;
      else&lt;br /&gt;
         if &amp;lt;(clone #) = [3]&amp;gt; then&lt;br /&gt;
            glide [0.2] secs to x:(. . .::grey) y:(. . .::grey)//here, set to the original position (the starting position of the sprite)&lt;br /&gt;
            delete this clone&lt;br /&gt;
         else&lt;br /&gt;
            delete this clone&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end   &lt;br /&gt;
set [position v] to [closed]&lt;br /&gt;
set [clone # v] to [0]&lt;br /&gt;
&lt;br /&gt;
when I start as a clone&lt;br /&gt;
   wait [0.2] seconds&lt;br /&gt;
   if &amp;lt;touching (mouse pointer v)?&amp;gt; then&lt;br /&gt;
      set [ghost v] effect to [20]&lt;br /&gt;
         if &amp;lt;mouse down?&amp;gt; then&lt;br /&gt;
            if &amp;lt;(clone #) = [1]&amp;gt; then&lt;br /&gt;
               set [chosen v] to [1]&lt;br /&gt;
               broadcast (close v)&lt;br /&gt;
         else&lt;br /&gt;
            if &amp;lt;(clone #) = [2]&amp;gt; then&lt;br /&gt;
               set [chosen v] to [2]&lt;br /&gt;
               broadcast (close v)&lt;br /&gt;
            else&lt;br /&gt;
               if &amp;lt;(clone #) = [3]&amp;gt; then&lt;br /&gt;
                  set [chosen v] to [3]&lt;br /&gt;
                  broadcast (close v)&lt;br /&gt;
            else&lt;br /&gt;
               delete this clone&lt;br /&gt;
               end&lt;br /&gt;
            end&lt;br /&gt;
         end   &lt;br /&gt;
      end&lt;br /&gt;
   else&lt;br /&gt;
      set [ghost v] effect to [0]&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
when gf clicked&lt;br /&gt;
   if &amp;lt;touching (mouse pointer v)?&amp;gt; then&lt;br /&gt;
      set [ghost v] effect to [20]&lt;br /&gt;
   else&lt;br /&gt;
      set [ghost v] effect to [0]&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example Project ==&lt;br /&gt;
The following is an example project.&lt;br /&gt;
* [[projects:549348205|Dropdown Menu Template]] on Scratch&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;TheTrillion</name></author>
	</entry>
</feed>