Skip to content
Browse files


  • Loading branch information...
Shinmera committed Aug 18, 2019
1 parent 5b36368 commit e855e15d66571dc27bdd22648ad9ecb47f79b920
Showing with 17 additions and 17 deletions.
  1. +16 −17 alloy/workbench.lisp
  2. +1 −0 package.lisp
@@ -7,33 +7,32 @@
(in-package #:org.shirakumo.fraf.trial.alloy)

(defclass workbench (trial:main) ()
(:default-initargs :clear-color (vec 0.3 0.45 0.4)))
(:default-initargs :clear-color (vec 0.3 0.3 0.3)))

(defmethod trial:setup-scene ((workbench workbench) scene)
(let* ((ui (trial:enter (make-instance 'ui) scene))
(focus (alloy:focus-tree ui))
(layout (alloy:layout-tree ui))
(button (make-instance 'alloy:button :text "Foo"))
(button2 (make-instance 'alloy:button :text "Bar"))
(button3 (make-instance 'alloy:button :text "Baz")))
(save (make-instance 'alloy:button :text "Save"))
(autosave (make-instance 'alloy:switch))
(title (make-instance 'alloy:input-line)))
(let ((layout (make-instance 'alloy:vertical-linear-layout :parent layout
:min-size (alloy:size 200 30))))
(alloy:enter button layout)
(let ((inner (make-instance 'alloy:horizontal-linear-layout :parent layout
:min-size (alloy:size 200 30))))
(alloy:enter save layout)
(let ((inner (make-instance 'alloy:grid-layout :parent layout
:cell-margins (alloy:margins :l 2 :u 2 :r 2 :b 2)
:col-sizes #(100 200)
:row-sizes #(30 30))))
(alloy:enter inner layout)
(alloy:enter button2 inner)
(let ((layout (make-instance 'alloy:vertical-linear-layout :parent inner
:min-size (alloy:size 200 30))))
(alloy:enter layout inner)
(alloy:enter button3 layout)
(alloy:enter (make-instance 'alloy:label :text "Bam") layout)))
(alloy:enter (make-instance 'alloy:label :text "Boof") layout))
(alloy:enter "Autosave" inner :col 0 :row 0)
(alloy:enter autosave inner :col 1 :row 0)
(alloy:enter "Title" inner :col 0 :row 1)
(alloy:enter title inner :col 1 :row 1)))
(let ((focus (make-instance 'alloy:focus-list :parent focus)))
(alloy:enter button focus)
(alloy:enter button2 focus)
(alloy:enter button3 focus)))
(alloy:enter autosave focus)
(alloy:enter title focus)
(alloy:enter save focus)))
(trial:enter (make-instance 'trial:2d-camera) scene)
(trial:enter (make-instance 'trial:render-pass) scene))

@@ -92,6 +92,7 @@
;; resources/vertex-array.lisp
;; resources/vertex-buffer.lisp

0 comments on commit e855e15

Please sign in to comment.
You can’t perform that action at this time.