]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
<gui-listbox> add-listbox!
authorJavier Sancho <jsf@jsancho.org>
Sat, 23 May 2020 18:08:16 +0000 (20:08 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sat, 23 May 2020 18:08:16 +0000 (20:08 +0200)
irrlicht.scm
irrlicht/gui.scm

index 5076c2a9aba72d76cb6d0e235ac7525018134885..d8fe491afdcab3a680b989536ed74bb961f6b86f 100644 (file)
@@ -45,6 +45,7 @@
                <gui-environment>
                <gui-font>
                <gui-image>
+               <gui-listbox>
                <gui-scrollbar>
                <gui-skin>
                <gui-static-text>
@@ -72,6 +73,7 @@
                add-file-archive!
                add-image!
                add-internal-point!
+               add-listbox!
                add-octree-scene-node!
                add-scrollbar!
                add-sphere-scene-node!
index ca705d528913035bf016fa6782052f4b2a596171..6f3780583fb907244dd9b8691a7a99d1219ef6c4 100644 (file)
     (let ((addImage (get-irrlicht-proc "addImage" gui-environment parent)))
       (addImage gui-environment image pos use-alpha-channel parent id text))))
 
+(define-method (add-listbox! (gui-environment <gui-environment>) rectangle . rest)
+  (let-keywords rest #f
+        ((parent (make <gui-element>))
+         (id -1)
+         (draw-background #f))
+    (let ((addListBox (get-irrlicht-proc "addListBox" gui-environment parent)))
+      (addListBox gui-environment rectangle parent id draw-background))))
+
 (define-method (add-scrollbar! (gui-environment <gui-environment>) horizontal rectangle . rest)
   (let-keywords rest #f
         ((parent (make <gui-element>))
   (let ((getSkin (get-irrlicht-proc "getSkin" gui-environment)))
     (getSkin gui-environment)))
 
-(export <gui-environment> add-button! add-image! add-scrollbar! add-static-text! draw-all
-        get-built-in-font get-font get-skin)
+(export <gui-environment> add-button! add-image! add-listbox! add-scrollbar! add-static-text!
+        draw-all get-built-in-font get-font get-skin)
 
 
 ;; IGUIStaticText
     (setPos scrollbar pos)))
 
 (export <gui-scrollbar> get-position set-max! set-position!)
+
+
+;; IGUIListBox
+(define-class <gui-listbox> (<gui-element>)
+  (irr-class #:init-value "IGUIListBox"))
+
+(export <gui-listbox>)