andrewb icon

yvonne2.r

andrewb | PRO | 11/12/14 01:12:48 AM UTC | 0 ⭐ | 11660 👁️ | Never ⏰ | []
REBOL |

900 B

|

None

|

0 👍

/

0 👎

rebol [
    Title: "Yvonne View"
    Version: 2.0
    Purpose: [To learn a bit about REBOL.]
]
 
counter: 0
ticks: 20
 
get-pic: func[] [
    parts: parse read http://pics.mytrapster.com/yvonne.php {="}
    to-image (load-image (load to-string parts/6))
]
 
set-size: func[ pic ] [
    tx: pic/size/x + 20
    ty: pic/size/y + 20
    to-pair (as-pair tx ty)
]
 
reset-b: func[w i] [
    temp: get-pic
    i/size: temp/size
    set-face i temp
    w/size: set-size temp
    show w
]
 
v1: layout [
    at 10x10 b: image get-pic rate 1 feel [engage: func[f a e] [
            if a = 'time[
                if counter = ticks[
                    counter: 0
                    reset-b v1 b
                ]
                counter: counter + 1
            ]
        ]
    ]
    
    at 10x10 btn "Refresh" [reset-b v1 b]
    
    at 75x10 btn "Quit" [quit]
]
 
view v1
 
do-events

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎