From e1e79af4472feb78b4ec672f768eb8fdd10670fc Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sat, 23 May 2020 09:07:32 +0200 Subject: [PATCH] add-button! --- irrlicht.scm | 2 ++ irrlicht/gui.scm | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/irrlicht.scm b/irrlicht.scm index 5b6481e..1fc0c4f 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -40,6 +40,7 @@ + @@ -62,6 +63,7 @@ ;; methods add-animated-mesh-scene-node! add-animator! + add-button! add-camera-scene-node! add-camera-scene-node-fps! add-cube-scene-node! diff --git a/irrlicht/gui.scm b/irrlicht/gui.scm index 5e2017b..86afd9c 100644 --- a/irrlicht/gui.scm +++ b/irrlicht/gui.scm @@ -49,6 +49,15 @@ (define-class () (irr-class #:init-value "IGUIEnvironment")) +(define-method (add-button! (gui-environment ) rectangle . rest) + (let-keywords rest #f + ((parent (make )) + (id -1) + (text "") + (tooltiptext "")) + (let ((addButton (get-irrlicht-proc "addButton" gui-environment parent))) + (addButton gui-environment rectangle parent id text tooltiptext)))) + (define-method (add-image! (gui-environment ) image pos . rest) (let-keywords rest #f ((use-alpha-channel #t) @@ -85,7 +94,8 @@ (let ((getSkin (get-irrlicht-proc "getSkin" gui-environment))) (getSkin gui-environment))) -(export add-image! add-static-text! draw-all get-built-in-font get-font get-skin) +(export add-button! add-image! add-static-text! draw-all get-built-in-font + get-font get-skin) ;; IGUIStaticText @@ -124,3 +134,10 @@ (irr-class #:init-value "IGUIFont")) (export ) + + +;; IGUIButton +(define-class () + (irr-class #:init-value "IGUIButton")) + +(export ) -- 2.39.5