How to Make a Drawing Tool: различия между версиями
(not informal and there is no first person) |
Patarakin (обсуждение | вклад) м (1 версия импортирована) |
(нет различий)
|
Текущая версия на 11:33, 21 июля 2022
This tutorial explains how to create a drawing tool.
What is a drawing tool?
A drawing tool is something that is used to help people draw stuff, the one we are using can do several things.
What will this drawing tool do?
The drawing tool will be able to change the pen's size, color, saturation, brightness, and transparency.
What is needed?
First, 3 sprites and 2 backgrounds are needed. One sprite should be named "Draw Tool", another should be named "Color State", and the final sprite should be named "Pause State".
One background should be named "Paused" and the other should be "Unpaused". Both of the backgrounds should be blank.
We also will need to use the Pen Extension.
The Variables
Draw Tool Sprite
This is a small ball, just use "ball-c" from the Sprite Library.
Color State Sprite
This is just a big red square that is set at 0,0. Please note that this sprite will not display the changes to the brightness.
Pause State Sprite
This sprite will show when the tool is paused. The black bar is where the settings to change the drawing stuff will be.
The Code
We are going to start with the easiest part of the code.