]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.gadgets.worlds: world-attributes can specify fill and orientation.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 19 Jan 2018 05:14:24 +0000 (21:14 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 19 Jan 2018 05:14:24 +0000 (21:14 -0800)
basis/ui/gadgets/worlds/worlds.factor

index 84effed4bfc086be2bb88483c597b76cc1165af5..5da76510ce251e88bd59476fed465ab7b05099eb 100644 (file)
@@ -54,7 +54,9 @@ TUPLE: world-attributes
     gadgets
     { pixel-format-attributes initial: $ default-world-pixel-format-attributes }
     { window-controls initial: $ default-world-window-controls }
-    pref-dim ;
+    pref-dim
+    { fill initial: 1 }
+    { orientation initial: $ vertical } ;
 
 : <world-attributes> ( -- world-attributes )
     world-attributes new ; inline
@@ -139,8 +141,10 @@ M: world apply-world-attributes
         [ window-controls>> >>window-controls ]
         [ initial-background-color >>background-color ]
         [ 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 ]
+        [ fill>> >>fill ]
+        [ orientation>> >>orientation ]
     } cleave ;
 
 : <world> ( world-attributes -- world )