Update of /project/pal/cvsroot/pal-gui/examples In directory clnet:/tmp/cvs-serv31543/examples
Modified Files: test.lisp Log Message:
--- /project/pal/cvsroot/pal-gui/examples/test.lisp 2007/10/16 21:46:09 1.5 +++ /project/pal/cvsroot/pal-gui/examples/test.lisp 2007/10/17 17:02:52 1.6 @@ -1,3 +1,10 @@ +;; TODO: +;; +;; Exports, gob picking, packing, destroy gob, window sizing, box labels, dialogs, menus, tooltips, keyboard control, scrollwheel +;; label, radio box, check box, joystick, scroll box, fix listbox, fix gauge, paragraph, text box, simple editor, drop box. +;; File open/save, directory, yes/no dialogs + + (in-package :pal-gui)
(define-tags plane (load-image "lego-plane.png") @@ -9,24 +16,24 @@ (window-2 (make-instance 'window :width 200 :height 300))
(box (make-instance 'h-box :parent window)) - (right-box (make-instance 'v-box :parent box)) - (left-box (make-instance 'v-box :parent box)) - (bottom-box (make-instance 'v-box :parent window)) + (left-box (make-instance 'v-box :parent box :label "RGBA")) + (right-box (make-instance 'v-box :parent box :label "Current FPS")) + (bottom-box (make-instance 'v-box :parent window :label "Bar"))
- (meter (make-instance 'h-meter :parent right-box :max-value 80 :display-fn (lambda (v) (format nil "FPS: ~a" v)))) + (meter (make-instance 'h-meter :parent right-box :max-value 100)) (rg (make-instance 'h-gauge :parent left-box - :min-value 0 :max-value 255 :value 0 :display-fn (lambda (v) (format nil "R: ~a" v)))) + :min-value 0 :max-value 255 :value 0)) (gg (make-instance 'h-gauge :parent left-box - :min-value 0 :max-value 255 :value 0 :display-fn (lambda (v) (format nil "G: ~a" v)))) + :min-value 0 :max-value 255 :value 0)) (bg (make-instance 'h-gauge :parent left-box - :min-value 0 :max-value 255 :value 0 :display-fn (lambda (v) (format nil "B: ~a" v)))) + :min-value 0 :max-value 255 :value 0)) (ag (make-instance 'h-gauge :parent left-box - :min-value 0 :max-value 255 :value 0 :display-fn (lambda (v) (format nil "A: ~a" v)))) + :min-value 0 :max-value 255 :value 0)) (list (make-instance 'list-box :parent window-2 :items (loop for i from 0 to 100 collect (format nil "FooBar ~a" i)))) (button (make-instance 'button :value "FooBar!" :parent window-2 :on-select (lambda (g pos) (message 'foo) t))) )
- (make-instance 'button :value "Button" :parent bottom-box) + ;; (make-instance 'button :value "Button" :parent bottom-box)
(gui-loop () (setf (value-of meter) (get-fps)) @@ -34,6 +41,7 @@ (with-blend (:color '(0 0 0 64)) (draw-image (tag 'plane) (v 320 220))) (with-blend (:color (list (value-of rg) (value-of gg) (value-of bg) (value-of ag))) - (draw-image (tag 'plane) (v 300 200))))))) + (draw-image (tag 'plane) (v 300 200))) + ))))
;; (test) \ No newline at end of file