From: Javier Sancho Date: Sat, 23 May 2020 18:59:16 +0000 (+0200) Subject: get-id X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=205969fe1c437850b377aa7ad715a927c3d5430b;p=guile-irrlicht.git get-id --- diff --git a/Makefile.am b/Makefile.am index e21fa49..1a68584 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,6 +35,7 @@ libguile_irrlicht_la_SOURCES = \ src/event-receiver.cpp \ src/file-archive.cpp \ src/file-system.cpp \ + src/gui-element.cpp \ src/gui-environment.cpp \ src/gui-in-out-fader.cpp \ src/gui-listbox.cpp \ diff --git a/irrlicht.scm b/irrlicht.scm index 4682a7a..e61be55 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -100,6 +100,7 @@ get-font get-fps get-gui-environment + get-id get-mesh get-name get-root-scene-node diff --git a/irrlicht/gui.scm b/irrlicht/gui.scm index 7d1819e..e154cb3 100644 --- a/irrlicht/gui.scm +++ b/irrlicht/gui.scm @@ -42,7 +42,11 @@ (define-class ( ) (irr-class #:init-value "IGUIElement")) -(export ) +(define-method (get-id (element )) + (let ((getID (get-irrlicht-proc "getID" element))) + (getID element))) + +(export get-id) ;; IGUIEnvironment diff --git a/src/guile-irrlicht.cpp b/src/guile-irrlicht.cpp index cd18a09..6223aac 100644 --- a/src/guile-irrlicht.cpp +++ b/src/guile-irrlicht.cpp @@ -27,6 +27,7 @@ #include "device.h" #include "event-receiver.h" #include "file-system.h" +#include "gui-element.h" #include "gui-environment.h" #include "gui-in-out-fader.h" #include "gui-listbox.h" @@ -56,6 +57,7 @@ extern "C" { init_device (); init_event_receiver (); init_file_system (); + init_gui_element (); init_gui_environment (); init_gui_in_out_fader (); init_gui_listbox ();