On Saturday, 25-September-2004 at 20:07:50 Izzy boy wrote,

>.... Is it possible?
>
>Say I have:
>
>>view A: layout [Item1: text "Hi!"]
>
>Is there a way to use A to add {text "Bye!"} to it, as
>if I had instead typed:
>
>>view A: layout [Item1: text "Hi!"  Item2: text "Bye!"]
>
>??

Not easily, I suspect.

>I'm working on a game.. If it works, I'd probably need
>that type of thing to add players that just appwalk onto
>the screen, or to Summon mosters to the area.

You might be better to use the Draw dialect, then your players can just be values in a 
block so you can add, delete and manipulate them at will.  An example...


REBOL []

players: [
    pen 255.0.0
    box 100x100 110x110
]

board: reduce ['draw players]

view layout [
    b: box 300x300 white effect board
    button "Add Player" 200 [
        pos: random 290x290
        append players reduce [
            'pen random 255.255.255
            'box pos pos + 10x10
        ]
        show b
    ]
    button "Move 1st Player" 200 [
        move: 5x5 - random 10x10
        players/4: players/4 + move
        players/5: players/5 + move
        show b
    ]
]


Read about the Draw dialect here...

http://www.rebol.com/docs/draw.html

Hope that gives you some ideas.

-- Carl Read

-- 
To unsubscribe from the list, just send an email to rebol-request
at rebol.com with unsubscribe as the subject.

Reply via email to