From: John Benediktsson Date: Thu, 22 Mar 2018 20:18:51 +0000 (-0700) Subject: pong: use different colors. X-Git-Tag: 0.98~105 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=89fa8e09eedf05a3f518120877acf2ae353c2b4e pong: use different colors. --- diff --git a/extra/pong/pong.factor b/extra/pong/pong.factor index bc4976df40..ad59df9600 100644 --- a/extra/pong/pong.factor +++ b/extra/pong/pong.factor @@ -16,7 +16,7 @@ CONSTANT: FONT $[ monospace-font t >>bold? COLOR: red >>foreground - COLOR: white >>background + COLOR: gray95 >>background ] TUPLE: ball pos vel ; @@ -33,7 +33,7 @@ DEFER: on-tick : ( -- gadget ) pong-gadget new initial-state - COLOR: white >>interior + COLOR: gray95 >>interior dup '[ _ on-tick ] f 16 milliseconds >>timer ; M: pong-gadget pref-dim* drop { 400 400 } ; @@ -42,7 +42,7 @@ M: pong-gadget ungraft* [ timer>> stop-timer ] [ call-next-method ] bi ; M:: pong-gadget draw-gadget* ( PONG -- ) - COLOR: dark-gray gl-color + COLOR: gray80 gl-color 15 390 20 [ 197 2array { 10 6 } gl-fill-rect ] each @@ -64,7 +64,7 @@ M:: pong-gadget draw-gadget* ( PONG -- ) ] [ PONG timer>> thread>> [ FONT 24 >>size - { "N - New Game" "SPACE - Pause" } + { " N - New Game" "SPACE - Pause" } [ text-width 390 swap - 2 / 100 2array ] [ '[ _ _ draw-text ] with-translation ] 2bi ] unless