From a33bf2efe7a2578915cd27d3d2f3462c41ca0517 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Fri, 22 May 2020 08:55:34 +0200 Subject: [PATCH] add-image! --- irrlicht.scm | 2 ++ irrlicht/gui.scm | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/irrlicht.scm b/irrlicht.scm index 1c34cc6..7498274 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -42,6 +42,7 @@ + @@ -63,6 +64,7 @@ add-cube-scene-node! add-custom-scene-node! add-file-archive! + add-image! add-internal-point! add-octree-scene-node! add-sphere-scene-node! diff --git a/irrlicht/gui.scm b/irrlicht/gui.scm index fe2f09d..10cf0bf 100644 --- a/irrlicht/gui.scm +++ b/irrlicht/gui.scm @@ -49,6 +49,15 @@ (define-class () (irr-class #:init-value "IGUIEnvironment")) +(define-method (add-image! (gui-environment ) image pos . rest) + (let-keywords rest #f + ((use-alpha-channel #t) + (parent (make )) + (id -1) + (text "")) + (let ((addImage (get-irrlicht-proc "addImage" gui-environment parent))) + (addImage gui-environment image pos use-alpha-channel parent id text)))) + (define-method (add-static-text! (gui-environment ) text rectangle . rest) (let-keywords rest #f ((border #f) @@ -64,7 +73,7 @@ ((get-irrlicht-proc "drawAll" gui-environment) gui-environment)) -(export add-static-text! draw-all) +(export add-image! add-static-text! draw-all) ;; IGUIStaticText @@ -72,3 +81,10 @@ (irr-class #:init-value "IGUIStaticText")) (export ) + + +;; IGUIImage +(define-class () + (irr-class #:init-value "IGUIImage")) + +(export ) -- 2.39.5