Reverse 'pixelcoloring' and total amount of colors
Jose Enrique Montero
montero.je at gmail.com
Mon Mar 5 13:40:23 CET 2018
I made a similar application, you can look,
2018-03-05 3:55 GMT-04:00 William de Smet via use-livecode <
use-livecode at lists.runrev.com>:
> Hi there,
> This is quite a challenge for me.
> I an trying to build a template in which users (small children) can
> 'pixeldraw' something and based on the drawing the instruction will be
> The instruction is needed for other children to make the pixel drawing.
> The instruction is quite special.
> The template is a square with 49 buttons (7x7) for the coloring and 49
> fields for the instruction.
> The coloring of the buttons is no problem. The 'reverse' coloring is the
> I can get the amount of a colors in a row (5 x white and 2 x blue) but how
> do I determine on which place (in which buttons) these colors are.
> The first row is: 3 white - 1 blue - 2 white - 1 blue
> But how do I output it like: 3 - 1- 2 - 1 ? And each number needs to be in
> another field.
> on mouseup
> if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to field
> end mouseup
> on mouseup
> repeat with x=1 to 7
> put "f"&x into tButton
> if the backgroundcolor of btn tButton is 255,255,255
> add "1" to field "v1"
> add "1" to field "v2"
> end if
> end mousep
> What is the best way to do this?
> Any pointers are welcome.
> To easier understand what i am trying to do, see this image:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode