diff options
Diffstat (limited to 'src/main.lisp')
| -rw-r--r-- | src/main.lisp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.lisp b/src/main.lisp index b3c6933..330abe4 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -14,6 +14,9 @@ (title :title-pane :display-time :command-loop :display-function 'display-title) + (panel :application + :label-alignment :top + :display-function 'display-panel) (int :interactor)) ;; :layouts section describes how the panes are layed out. @@ -21,11 +24,12 @@ (:layouts (default (clim:vertically () (1/8 title) - (7/8 int))))) + (5/8 panel) + (2/8 int))))) -(defun format-panel (panel) +(defun format-panel (panel stream) (loop for it in panel do - (format t "~a :~T ~$$ [~@$$] owned: ~a~%" + (format stream "~a :~T ~$$ [~@$$] owned: ~a~%" (getf it :name) (getf it :price) (getf it :profit) @@ -47,10 +51,12 @@ 300 2 :align-x :center :align-y :top)) + (defmethod display-panel ((frame superapp) stream) + (format-panel (game:commodities-panel g) stream)) ;; Panel command (define-superapp-command (com-panel :name t) () - (format-panel (game:commodities-panel g))) + (format-panel (game:commodities-panel g) t)) ;; Buy command (define-superapp-command (com-buy :name t) ((item 'string) (quantity 'integer)) |
