Windows issues parsing these characters. Bug fix for entering edit mode without setti...
[cowl.git] / examples / 02-simple-button.lisp
blob838e4c901189fff62ba508254ddd42d9bb5563b6
1 (require '#:asdf)
2 (asdf:oos 'asdf:load-op '#:cowl-glfw)
4 (defun main ()
5 (glfw:do-window (:title "Cowl Simple Button" :width 400 :height 300
6 :opengl-version-major 2
7 :opengl-version-minor 0)
8 ((setf cowl:*root-widget*
9 (cowl:make-button (:x 100 :y 100) "Click to exit!"
10 ;; The body of this macro is executed on left-click.
11 (return-from main)))
13 ;; Attach the cowl input callbacks to GLFW.
14 ;; Note that this will wipe out your own input callbacks,
15 ;; if any are already set up to GLFW.
16 (cowl-glfw:setup-input-callbacks))
18 ;; Main loop the same as before
19 (gl:clear gl:+color-buffer-bit+)
20 (cowl:layout-root)
21 (cowl:draw-root)
22 (sleep 0.04)))
24 (main)