<?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_Drawing_Tool</id>
	<title>How to Make a Drawing Tool - История изменений</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_Drawing_Tool"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Drawing_Tool&amp;action=history"/>
	<updated>2026-05-22T17:43:45Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Make_a_Drawing_Tool&amp;diff=1828&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_Drawing_Tool&amp;diff=1828&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:17Z</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;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&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;4&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;!-- diff cache key digida:diff:1.41:old-1827:rev-1828 --&gt;
&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Make_a_Drawing_Tool&amp;diff=1827&amp;oldid=prev</id>
		<title>scratch&gt;CrazyBoy826: not informal and there is no first person</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Drawing_Tool&amp;diff=1827&amp;oldid=prev"/>
		<updated>2022-07-11T22:39:08Z</updated>

		<summary type="html">&lt;p&gt;not informal and there is no first person&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This tutorial explains &amp;#039;&amp;#039;&amp;#039;how to create a drawing tool&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== What is a drawing tool? ==&lt;br /&gt;
A drawing tool is something that is used to help people draw stuff, the one we are using can do several things.&lt;br /&gt;
&lt;br /&gt;
== What will this drawing tool do? ==&lt;br /&gt;
The drawing tool will be able to change the pen&amp;#039;s size, color, saturation, brightness, and transparency.&lt;br /&gt;
&lt;br /&gt;
== What is needed? ==&lt;br /&gt;
First, 3 sprites and 2 backgrounds are needed. One sprite should be named &amp;quot;Draw Tool&amp;quot;, another should be named &amp;quot;Color State&amp;quot;, and the final sprite should be named &amp;quot;Pause State&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One background should be named &amp;quot;Paused&amp;quot; and the other should be &amp;quot;Unpaused&amp;quot;. Both of the backgrounds should be blank.&lt;br /&gt;
&lt;br /&gt;
We also will need to use the [[Pen Extension]].&lt;br /&gt;
&lt;br /&gt;
=== The Variables ===&lt;br /&gt;
* &amp;lt;sb&amp;gt;(Brightness:) // This should be a slider. Min: 0.00, Max: 100.00&amp;lt;/sb&amp;gt;&lt;br /&gt;
* &amp;lt;sb&amp;gt;(Color:) // This should be a slider. Min: 0.00, Max: 200.00&amp;lt;/sb&amp;gt;&lt;br /&gt;
* &amp;lt;sb&amp;gt;(paused?) // Can be either yes or no. This states if it is paused or unpaused.&amp;lt;/sb&amp;gt;&lt;br /&gt;
* &amp;lt;sb&amp;gt;(Pen Size:) // This should be a slider. Min: 1.00, Max: 200.00&amp;lt;/sb&amp;gt;&lt;br /&gt;
* &amp;lt;sb&amp;gt;(Pen Up?) // Can be either yes or no. This states if the pen is up or down.&amp;lt;/sb&amp;gt;&lt;br /&gt;
* &amp;lt;sb&amp;gt;(Saturation:) // This should be a slider. Min: 0.00, Max: 100.00&amp;lt;/sb&amp;gt;&lt;br /&gt;
* &amp;lt;sb&amp;gt;(Transparency:) // This should be a slider. Min: 0.00, Max: 100.00&amp;lt;/sb&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Draw Tool Sprite ===&lt;br /&gt;
This is a small ball, just use &amp;quot;ball-c&amp;quot; from the [[Library|Sprite Library]].&lt;br /&gt;
[[File:Draw Tool.svg|center|thumb|This is the Draw Tool sprite.]]&lt;br /&gt;
&lt;br /&gt;
=== Color State Sprite ===&lt;br /&gt;
This is just a big red square that is set at 0,0.&lt;br /&gt;
Please note that this sprite will not display the changes to the brightness.&lt;br /&gt;
[[File:Color State.svg|center|thumb|This is the Color State Sprite.]]&lt;br /&gt;
&lt;br /&gt;
=== Pause State Sprite ===&lt;br /&gt;
This sprite will show when the tool is paused.&lt;br /&gt;
The black bar is where the settings to change the drawing stuff will be.&lt;br /&gt;
[[File:Pause State.svg|center|thumb|This is the Pause State sprite.]]&lt;br /&gt;
&lt;br /&gt;
== The Code ==&lt;br /&gt;
We are going to start with the easiest part of the code.&lt;br /&gt;
&lt;br /&gt;
=== Pause State Code ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when green flag clicked&lt;br /&gt;
show&lt;br /&gt;
go to x:(0) y:(0)&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when [p: v] key pressed // this states what happens with this sprite when it is paused&lt;br /&gt;
if &amp;lt;(paused?)=[yes]&amp;gt; then&lt;br /&gt;
   hide // hides this sprite when unpaused&lt;br /&gt;
else&lt;br /&gt;
   show // shows when paused&lt;br /&gt;
   go to [front: v] layer&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Color State Code ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when green flag clicked&lt;br /&gt;
show&lt;br /&gt;
go to x:(0) y:(0)&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when green flag clicked&lt;br /&gt;
forever // this is to change the color state that this sprite is in, it reflects a close replica of what the drawing color will be, but it will not be able to change the brightness    if &amp;lt;(paused?)=[yes]&amp;gt; then&lt;br /&gt;
   set [color: v] effect to (Color:)&lt;br /&gt;
   set [brightness: v] effect to ([100]-(Saturation:)) // this block souldn&amp;#039;t have been named brightness when it doesn&amp;#039;t even change the brightness, when testing was being done we found that this block changed the saturation of the sprite and not the brightness&lt;br /&gt;
   set [ghost: v] effect to (Transparency:)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when [p: v] key pressed // this states what happens with this sprite when it is paused&lt;br /&gt;
if &amp;lt;(paused?)=[yes]&amp;gt; then&lt;br /&gt;
   hide // hides this sprite when unpaused&lt;br /&gt;
else&lt;br /&gt;
   show // shows when paused&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Draw Tool Code ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when green flag clicked&lt;br /&gt;
erase all // clears the drawing every time the flag is clicked&lt;br /&gt;
switch backdrop to [paused: v] // states that the tool starts up puased&lt;br /&gt;
set [Pen Up?: v] to [yes]&lt;br /&gt;
set [Color: v] to [0] // default start color, which is red&lt;br /&gt;
set [Pen Size: v] to [50] // default pen size, should be close to the same size as this sprite, so when this number changes the size of this sprite changes with it&lt;br /&gt;
set [Saturation: v] to [100] // default saturation, if this is set to 0 then the color will be white&lt;br /&gt;
set [Brightness: v] to [100] // default brightness, if this is set to 0 then the color will be black&lt;br /&gt;
set [Transparency: v] to [0] // default transparency&lt;br /&gt;
set [paused?: v] to [yes]&lt;br /&gt;
go to x:(184) y:(129)&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when green flag clicked&lt;br /&gt;
forever&lt;br /&gt;
if &amp;lt;(paused?)=[no]&amp;gt; then&lt;br /&gt;
   go to [mouse-pointer: v]&lt;br /&gt;
else&lt;br /&gt;
   set size to (Pen Size:) %&lt;br /&gt;
   set pen size to ((Pen Size:)/[2.272727272727273])&lt;br /&gt;
   set pen [color: v] to (Color:)&lt;br /&gt;
   set pen [saturation: v] to (Saturation:)&lt;br /&gt;
   set pen [brightness: v] to (Brightness:)&lt;br /&gt;
   set pen [transparency: v] to (Transparency:)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when [s: v] key pressed // this is so that you can start and stop drawing at your lesure without having to pause&lt;br /&gt;
if &amp;lt;not &amp;lt;(paused?)=[yes]&amp;gt;&amp;gt; then&lt;br /&gt;
   pen down&lt;br /&gt;
   set [Pen Up?: v] to [no]&lt;br /&gt;
else&lt;br /&gt;
   pen up&lt;br /&gt;
   set [Pen Up?: v] to [yes]&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when [p: v] key pressed // this states what happens with this sprite when it is paused&lt;br /&gt;
if &amp;lt;(paused?)=[yes]&amp;gt; then&lt;br /&gt;
   hide variable [Pen Size: v]&lt;br /&gt;
   hide variable [Color: v]&lt;br /&gt;
   hide variable [Saturation: v]&lt;br /&gt;
   hide variable [Brightness: v]&lt;br /&gt;
   hide variable [Transparency: v]&lt;br /&gt;
   switch backdrop to [unpaused: v]&lt;br /&gt;
   set [Paused?: v] to [no] // sets to unpaused&lt;br /&gt;
else&lt;br /&gt;
   pen up&lt;br /&gt;
   set [Pen Up?: v] to [yes]&lt;br /&gt;
   show variable [Pen Size: v]&lt;br /&gt;
   show variable [Color: v]&lt;br /&gt;
   show variable [Saturation: v]&lt;br /&gt;
   show variable [Brightness: v]&lt;br /&gt;
   show variable [Transparency: v]&lt;br /&gt;
   switch backdrop to [paused: v]&lt;br /&gt;
   set [Paused?: v] to [yes] // sets to paused&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;CrazyBoy826</name></author>
	</entry>
</feed>