[pal-cvs] CVS pal-gui/examples
tneste
tneste at common-lisp.net
Mon Oct 15 21:55:54 UTC 2007
Update of /project/pal/cvsroot/pal-gui/examples
In directory clnet:/tmp/cvs-serv18131/examples
Modified Files:
test.lisp
Log Message:
Getting off the ground.
--- /project/pal/cvsroot/pal-gui/examples/test.lisp 2007/10/15 19:14:35 1.1
+++ /project/pal/cvsroot/pal-gui/examples/test.lisp 2007/10/15 21:55:54 1.2
@@ -6,16 +6,17 @@
(defun test ()
(with-gui (:paths (merge-pathnames "examples/" pal::*pal-directory*))
(let* ((window (make-instance 'window :pos (v 200 200) :width 300 :height 200))
- (slider (make-instance 'v-slider :pos (v 250 20) :height 150 :parent window :max-value 200 :page-size 100))
(meter (make-instance 'h-meter :pos (v 30 50) :width 150 :parent window :max-value 80 :display-fn (lambda (v) (format nil "FPS: ~a" v))))
(gauge (make-instance 'h-gauge :pos (v 30 20)
:width 150
:parent window
:min-value 0 :max-value 255 :value 0 :display-fn (lambda (v) (format nil "R: ~a" v))))
- (button (make-instance 'button :pos (v 100 100) :value "FooBar!" :parent window)))
+ (button (make-instance 'button :pos (v 100 100) :value "FooBar!" :parent window :width 100 :on-select (lambda (g pos) (message 'foo) t)))
+
+ (window-2 (make-instance 'window :pos (v 20 20) :width 200 :height 300))
+ (list (make-instance 'list-box :pos (v 10 10) :parent window-2 :items (loop for i from 0 to 10 collect (format nil "FooBar ~a" i)))))
(gui-loop ()
- (setf (value-of button) (value-of slider))
(setf (value-of meter) (get-fps))
(draw-image* (tag 'tile) (v 0 0) (v 0 0) 800 600)
(with-blend (:color (list (value-of gauge) 0 0 64))
More information about the Pal-cvs
mailing list