EQL5/examples/M-modules/quick/Tic-Tac-Toe/tic-tac-toe.lisp

22 lines
558 B
Common Lisp

;;;
;;; for (c) please see COPYING.txt
;;;
;;; This is a port of a QtQuick1/Qt4 example.
;;; The JS game logic has been ported to Lisp.
;;;
(qrequire :quick)
(require :qml-lisp "qml-lisp")
(require :game-logic "game-logic")
(require :properties "properties")
(defun run ()
;; *quick-view* can be either a QQuickView or a QQuickWidget
(setf qml:*quick-view* (qnew "QQuickView"))
(x:do-with qml:*quick-view*
(|setSource| (|fromLocalFile.QUrl| "qml/tic-tac-toe.qml"))
(|setResizeMode| |QQuickView.SizeRootObjectToView|)
(|show|)))
(run)