Here's another way that works on last
full version
REBOL/View 1.2.1.3.1 21-Jun-2001:

Drag is not implemented, but you can click.

view center-face layout [
        box red
        at 40x40
        box 50x50 white effect [merge oval key 0.0.0] feel [
                engage: func [face action event][
                        if action = 'down [
                                face/offset: face/offset + 2x2
                                show face
                        ]
                ]
        ]
]

I didn't quickly figure out how to do this
in latest betas. Effects pipeline is changing.

Anton.

> I'm trying to create a little board game, mainly as a way of improving my
> VID/View skills.
>
> I can draw the board using a combination of the draw dialect and
> VID elements.
>
> But I'm stuck at drawing a *circular* counter that can be dragged
> and dropped
> anywhere on the board:
>
> -- If I wanted square counters I could use a layout [box 50x50]
>
> -- If I wanted a circular counter that doesn't move, I could use
> layout [draw
> box effect [[circle 10x10 30x30]]]
>
> I thought of using radio buttons. But they are fixed-sized images in a
> *square* box. I want the counters to be user-resizable and user-colorable.
>
> And ideas about how I can render a movable circular counter on the sample
> layout below would be greatly received.
>
> rebol []
>
> Board-elements: Stylize [
>     black-square: box 100.100.100 50x50
>     white-square: box white 50x50
>     die: box 30x30 "6"
>     ]
>
> unview/all
> view layout [
>     styles board-elements
>     space 0x0
>     across
>     black-square
>     white-square
>     black-square
>     return
>     white-square
>     black-square
>     white-square
>     return
>     black-square
>     white-square
>     black-square
>     return
>     die blue
>     die red
>     ]
>
>
> Thanks!
> Sunanda.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to