Selecting Colors to draw with

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
marcelloe
Posts: 140
Joined: Thu Oct 17, 2013 2:26 pm

Selecting Colors to draw with

Post by marcelloe » Thu Oct 17, 2013 7:55 pm

Hopefully I can explain this clear enough. I am creating a drawing application. I want to be able to select different colors to draw a picture. I have buttons set for each color I want to use. I don't know how to select between different colors and then draw with that color. Any guidance would be greatly appreciated.

Thanks in advance,

Mark

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Selecting Colors to draw with

Post by LCNeil » Thu Oct 17, 2013 10:25 pm

Hi Mark,

I have updated your sketchPad stack, that you emailed to us, with this feature.

I used a combination of global variables along with setting the foregroundColor of the created graphic to a requested color.

Would you like me to email this stack back to you, or would it be ok to post here in this forum topic?

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--

-----

marcelloe
Posts: 140
Joined: Thu Oct 17, 2013 2:26 pm

Re: Selecting Colors to draw with

Post by marcelloe » Fri Oct 18, 2013 2:36 am

I would prefer that you email me back. I really appreciate all the help.

Thanks,

Mark

marcelloe
Posts: 140
Joined: Thu Oct 17, 2013 2:26 pm

Re: Selecting Colors to draw with

Post by marcelloe » Wed Oct 23, 2013 9:46 pm

Now I am trying to use different tools to create a picture and want to select between the different tools. This is the code I think I need to use. Am I even heading in the right direction.

On the tool buttons

on mouseUp
put "spray can" into currentToolUse
end mouseUP

in the drawing area
global currentToolUse

on mouseEnter
global currentToolUse
choose currentToolUse tool
end mouseEnter

on mouseLeave
choose browser tool
end mouseLeave

Post Reply

Return to “idea2app and Coding School”