From d2894204ea9e767dc6534a88fc7dba4ca6e9bd1f Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Fri, 25 Jul 2008 16:41:03 -0500 Subject: [PATCH] boids.ui: Clean up shelf code --- extra/boids/ui/ui.factor | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/extra/boids/ui/ui.factor b/extra/boids/ui/ui.factor index 4639a0b58d..3d0916d835 100755 --- a/extra/boids/ui/ui.factor +++ b/extra/boids/ui/ui.factor @@ -116,34 +116,36 @@ VARS: population-label cohesion-label alignment-label separation-label ; - { - [ "ESC - Pause" [ drop toggle-loop ] button* ] - - [ "1 - Randomize" [ drop randomize ] button* ] - - [ 1 over set-pack-fill + "ESC - Pause" [ drop toggle-loop ] button* add-gadget + + "1 - Randomize" [ drop randomize ] button* add-gadget + + 1 over set-pack-fill population-label> add-gadget "3 - Add 10" [ drop add-10-boids ] button* add-gadget - "2 - Sub 10" [ drop sub-10-boids ] button* add-gadget ] - - [ 1 over set-pack-fill + "2 - Sub 10" [ drop sub-10-boids ] button* add-gadget + add-gadget + + 1 over set-pack-fill cohesion-label> add-gadget "q - +0.1" [ drop inc-cohesion-weight ] button* add-gadget - "a - -0.1" [ drop dec-cohesion-weight ] button* add-gadget ] + "a - -0.1" [ drop dec-cohesion-weight ] button* add-gadget + add-gadget - [ 1 over set-pack-fill + 1 over set-pack-fill alignment-label> add-gadget "w - +0.1" [ drop inc-alignment-weight ] button* add-gadget - "s - -0.1" [ drop dec-alignment-weight ] button* add-gadget ] + "s - -0.1" [ drop dec-alignment-weight ] button* add-gadget + add-gadget - [ 1 over set-pack-fill + 1 over set-pack-fill separation-label> add-gadget "e - +0.1" [ drop inc-separation-weight ] button* add-gadget - "d - -0.1" [ drop dec-separation-weight ] button* add-gadget ] + "d - -0.1" [ drop dec-separation-weight ] button* add-gadget + add-gadget - } [ call ] map [ add-gadget ] each - 1 over set-pack-fill - @top grid-add + 1 over set-pack-fill + @top grid-add slate> @center grid-add