ui.gadgets.worlds: world-attributes can specify fill and orientation.

factor-shell
John Benediktsson 2018-01-18 21:14:24 -08:00
parent f1281eb63a
commit 1d751e7e12
1 changed files with 6 additions and 2 deletions

View File

@ -54,7 +54,9 @@ TUPLE: world-attributes
gadgets gadgets
{ pixel-format-attributes initial: $ default-world-pixel-format-attributes } { pixel-format-attributes initial: $ default-world-pixel-format-attributes }
{ window-controls initial: $ default-world-window-controls } { window-controls initial: $ default-world-window-controls }
pref-dim ; pref-dim
{ fill initial: 1 }
{ orientation initial: $ vertical } ;
: <world-attributes> ( -- world-attributes ) : <world-attributes> ( -- world-attributes )
world-attributes new ; inline world-attributes new ; inline
@ -139,8 +141,10 @@ M: world apply-world-attributes
[ window-controls>> >>window-controls ] [ window-controls>> >>window-controls ]
[ initial-background-color >>background-color ] [ initial-background-color >>background-color ]
[ grab-input?>> >>grab-input? ] [ grab-input?>> >>grab-input? ]
[ gadgets>> dup sequence? [ [ 1 track-add ] each ] [ 1 track-add ] if ] [ gadgets>> dup sequence? [ [ f track-add ] each ] [ f track-add ] if ]
[ pref-dim>> >>pref-dim ] [ pref-dim>> >>pref-dim ]
[ fill>> >>fill ]
[ orientation>> >>orientation ]
} cleave ; } cleave ;
: <world> ( world-attributes -- world ) : <world> ( world-attributes -- world )