[REBOL] Re: Zilch
From: antonr:iinet:au at: 26-May-2003 1:02
By default, the borders of a layout are 20x20,
so you get an extra space after the rightmost edge
of all the faces in the layout.
Change this using ORIGIN.
I presume that you wanted the layout to be 450 pixels
wide. Well, your heading is specified to be 450 wide,
but you used AT to set the start offset to 10 pixels
from the left margin.
Here's the modified code:
lay: layout [
style dice button 32x32 (dices-images/7) feel [engage: func [f a e] [if
config/cpu-players/:cp [return] if game-over [return] if a = 'up
[board-click f/user-data]]]
style menubtn button 90x18 gray
backtile polished orange
;size 450x370
across
origin 0x0 ; <-----
;at 0x0 ; <------- no longer necessary
space 0x0
menubtn "New game" [new-game]
menubtn "Options" [game-over: true show-config]
menubtn "Statistics" [show-statistics]
menubtn "About" [show-about]
menubtn "Quit" [quit]
return
;at 10x40 ; <----------
guide
space 2x6
lbl-title: h1 450x50 center "ZILCH (c) Davide Gessi 2003" maroon return
lbl-score: label yellow 200x30 "Score: 0"
Anton.