Does anyone know how to do frames on a drawing pad?

howto

#1

Can someone teach me how to do frames on a drawing pad? As, in when you press an arrow, more colors are shown, for example Serenity’s and wef2d’s new pad.
If this is allowed: @OMTL


#2

Frames?


#3

For example look at Serenity’s or wef2d’s recent pads


#4

Screenshot?


#5

Ummm ok just a sec…


#6

The bottom arrows, when you press them, go to different frames of colors.


#7

Using variables. I’ll make an example.


#8

Ok, thank you so much!!!


#9


Easily modifiable for a drawing pad.


#10

Thank you!!!


#11

So…I just have to put this code to every color?
I don’t exactly get it…


#12

Use self variables for all but the main frame one. Have one for h one for s and one for b on each frame.

Alternatively, you could have one self variable a frame, but that’d require a few math operators and is t tested yet.


#13

Ummm but there is only a main frame and then when you press the arrow, it turns to a different frame?
Oh wait nvm


#14

Yea! You drag the blocks and have them what ever size. Like this:


Do you see the blocks close by to the flowers? That’s what I used


#15

No XD thats way too simple lol
I meant by arrows, when you press them, it goes to another set of colors…


#16

You just use the same object, but change the HSB values

Ex.
When Page = 1
Set color to (HSB 0,50,100)
End

When Page = 2
Set color to (HSB 50,50,100)
End

When Self is tapped
If Page = 1
Set H to: 0
Set S to: 50
Set B to : 100
End
If Page = 2
Set H to: 50
Set S to: 50
Set B to: 100
End
End

Sorry that’s kind of confusing XD I can make a project if you want


#17

That’s a really good guide!!!
Thank you sooo much!


#18

Awww, NOOOOOOOOOO I’M LATE!!! :frowning:


#19

I think that the code in my drawing pad SuperDraw might help.

It’s built this way:
Choosing colors:
To choose which color “frame” or color palette you want, you tap a text and it will change the number of a value called Menu Items. Every color is represented by a square. To show the square at the right time, I used some Check If Else-blocks.
Drawing:
To make the drawing lag-free, I used one separate rule for each colors. It’s basically a “When _____ equals _____”-rule and a code for normal drawing.
If you want a link or some screenshots, just tell me :slight_smile:


#20

You can still give me code, if you want to!!!