]> gitweb.factorcode.org Git - factor.git/commitdiff
pong: use different colors.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Mar 2018 20:18:51 +0000 (13:18 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Mar 2018 20:18:51 +0000 (13:18 -0700)
extra/pong/pong.factor

index bc4976df40405529a1125556309b5fb88e91e412..ad59df960082d64f48b903cdd8cd81080376a476 100644 (file)
@@ -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
 
 : <pong-gadget> ( -- gadget )
     pong-gadget new initial-state
-        COLOR: white <solid> >>interior
+        COLOR: gray95 <solid> >>interior
         dup '[ _ on-tick ] f 16 milliseconds <timer> >>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 <range> [
         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