Rebol Talk Forum  |  Getting Started  |  Code Examples, Tips & Advice  |  Topic: Zenner game/test
Pages: [1] Print
Author Topic: Zenner game/test  (Read 805 times)
leke
Jr. Member
**
Offline Offline

Posts: 86


View Profile WWW
Zenner game/test
« on: May 25, 2006, 02:17:15 PM »

I made this a little while ago, but I`ve had no time to finish it. It works ok and just needs a counter to show how many turns you have left as you play.

Downloand the exe and source here:

http://geocities.com/leke1975/zenner.zip

Feel free to mod it in any way. I tried to do the button pics in DRAW but had some trouble with the wavey lines. I have used jpgs for now. It would be cool if the whole thing was 100% rebol/view.

Leke.
Logged

Anton
Jr. Member
**
Offline Offline

Posts: 65

Rebol veteran


View Profile WWW
Re: Zenner game/test
« Reply #1 on: August 27, 2006, 10:43:16 AM »

Hi, you should be able to generate images directly using TO-IMAGE on the face returned by LAYOUT.
eg:

   img: to-image layout [
      origin 0
      button "hello"
   ]

So your game could have its images generated on the fly like this:

   circle-img: to-image layout [
      origin 0
      backcolor 23.23.23
      
      button white 150x200 effect [
      
         draw [
            ;circle point radius
            pen black
            fill-pen 0.0.1
            circle 75x95 55
            
            pen black
            fill-pen white
            circle 75x95 45
         ]
      ]
   ]
   
   square-img: to-image layout [
      origin 0
      backcolor 23.23.23
   
      button WHITE 150x200 effect [
      
         draw [
            pen black
            fill-pen black
            box 125x150 25x50 ;SIDES: right x bottom / left x top
            pen black
            fill-pen white
            box 115x140 35x60
         ]
      ]
   ]
   
and lets just quickly look at them:

   view layout [image circle-img image square-img]

That should help things along a bit.
Regards,

Anton.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Code Examples, Tips & Advice  |  Topic: Zenner game/test
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 17, 2008, 06:55:32 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2169 Posts in 562 Topics by 1224 Members
Latest Member: thyptoste

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc