[REBOL] Re: Request-color use
From: ronald:gruss:libertysurf at: 10-May-2001 3:24
Hi, Scott,
I'm glad to see how fast and how kindly you (from the rebol-list) answer to
my questions which must seem quite easy for you. Thanks.
But in this case, it doesn't solve my problem : the base of my script was
Carl's "Cool Effect Gel" demo script, using a rotary button select thru
effects and applying to gel. I'd like to be able to choose the color of the
'multiply' effect (for instance by double-clicking or right-clicking on the
gel)
Whith 255.0.0 in place of xxxxxx, the gel's color is fixed to red
Trying whith request-color, the gel color is black and no color choice
appears.
When I try
>> request-color/color black ; and put the color to blue I get
== 0.0.255
It should work !!!
This script is intended to be used whith children to experiment the effects
of colored filters upon other colors. It would be interresting to make 3 of
these filters (gel) being able to select each filter color (whith the
request-color function)
Sorry if I wasn't precise enough, but my english is far away from "perfect"
!!!
REBOL []
image1: load-thru/binary http://www.rebol.com/view/nyc.jpg
image2: load-thru/binary http://www.rebol.com/view/palms.jpg
faces: layout [
img: image 300x300 image1
below
across
button image1 70x70 [img/image: image1 show img]
button image2 70x70 [img/image: image2 show img]
return
pos: vh2 90x24
]
vid-face: get-style 'face
append faces/pane v-face: make vid-face [
size: 90x90
pos/text: offset: 340x20
edge: make edge [color: 250.120.40 size: 4x4]
color: font: para: text: data: image: none
effect: [multiply xxxxxx]
feel: make feel [
engage: func [f a e] [ ;intercepts target face events
if find [over away] a [
pos/text: f/offset: confine f/offset + e/offset - f/data f/size
0x0 f/parent-face/size
f/effect: [multiply xxxxxx]
show [f pos]
]
if a = 'down [f/data: e/offset ]
]
]
]
view faces
Bye