Skip to content
Permalink
Browse files

Add scaling-ui

  • Loading branch information
Shinmera committed Nov 30, 2019
1 parent 0d8469c commit 0ddee8d41d713272f7fbef872f22863a0f9adb05
Showing with 7 additions and 0 deletions.
  1. +7 −0 alloy/ui.lisp
@@ -9,6 +9,9 @@
(defclass ui (renderer alloy:ui trial:entity)
())

(defclass scaling-ui (ui)
())

(defmethod trial:paint ((ui ui) target)
(alloy:render ui ui))

@@ -18,6 +21,10 @@
(defmethod trial:handle ((ev trial:event) (ui ui)))

(defmethod trial:handle ((ev trial:resize) (ui ui))
(setf (alloy:visible-bounds ui) (alloy:px-extent 0 0 (trial:width ev) (trial:height ev)))
(alloy:suggest-bounds (alloy:visible-bounds ui) (alloy:layout-tree ui)))

(defmethod trial:handle ((ev trial:resize) (ui scaling-ui))
(alloy:suggest-bounds (alloy:px-extent 0 0 (trial:width ev) (trial:height ev)) ui))

(defmacro define-event-translator (trial-type alloy-type &body args)

0 comments on commit 0ddee8d

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