]> git.jsancho.org Git - c-irrlicht.git/blobdiff - src/IGUIEnvironment.cpp
Rename functions and fix some little bugs
[c-irrlicht.git] / src / IGUIEnvironment.cpp
index 4a5d68b5d2b24234fa70f44e5287352b35779a78..927c0b986b943441ec061e29a687e49766e9fa92 100644 (file)
 
 extern "C" {
   irr_gui_IGUIStaticText*
-  irr_gui_IGUIEnvironment_addStaticText(irr_gui_IGUIEnvironment* guienv,
-                                        const char* text,
-                                        const irr_core_rect_s32* rectangle,
-                                        int border,
-                                        int wordWrap,
-                                        irr_gui_IGUIElement* parent,
-                                        int id,
-                                        int fillBackground)
+  irr_gui_addStaticText(irr_gui_IGUIEnvironment* guienv,
+                        const char* text,
+                        const irr_core_rect_s32* rectangle,
+                        int border,
+                        int wordWrap,
+                        irr_gui_IGUIElement* parent,
+                        int id,
+                        int fillBackground)
   {
     // Convert to wide char text
     wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t));
     mbsrtowcs(wtext, &text, strlen(text) + 1, NULL);
 
     // Make rectangle
-    irr::core::rect<irr::s32> rect =            \
+    irr::core::rect<irr::s32> rect =
       irr::core::rect<irr::s32>(rectangle->x,
                                 rectangle->y,
                                 rectangle->x2,
                                 rectangle->y2);
 
     // Add static text
-    irr::gui::IGUIStaticText *staticText =                              \
-      ((irr::gui::IGUIEnvironment*)guienv)->addStaticText(wtext,
-                                                          rect,
-                                                          border,
-                                                          wordWrap,
-                                                          (irr::gui::IGUIElement*)parent,
-                                                          id,
-                                                          fillBackground);
+    irr::gui::IGUIStaticText *staticText =
+      ((irr::gui::IGUIEnvironment*)guienv)
+      ->addStaticText(wtext,
+                      rect,
+                      border,
+                      wordWrap,
+                      (irr::gui::IGUIElement*)parent,
+                      id,
+                      fillBackground);
     return staticText;
   }
 
   void
-  irr_gui_IGUIEnvironment_drawAll(irr_gui_IGUIEnvironment* guienv)
+  irr_gui_drawAll(irr_gui_IGUIEnvironment* guienv)
   {
     ((irr::gui::IGUIEnvironment*)guienv)->drawAll();
   }