X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2FIGUIEnvironment.cpp;h=927c0b986b943441ec061e29a687e49766e9fa92;hb=bf35c1c5384d6ccae7b7690ee08c511d036ffaec;hp=b5bc9e1b97ab6306319081463cb645f473fc3d0e;hpb=26e0d2232734e893983975b68d3a760b147e8e8c;p=c-irrlicht.git diff --git a/src/IGUIEnvironment.cpp b/src/IGUIEnvironment.cpp index b5bc9e1..927c0b9 100644 --- a/src/IGUIEnvironment.cpp +++ b/src/IGUIEnvironment.cpp @@ -24,35 +24,43 @@ #include "IGUIEnvironment.h" extern "C" { - void* irr_gui_IGUIEnvironment_addStaticText(void* guienv, - const char* text, - const irr_core_rect_s32* rectangle, - bool border, - bool wordWrap, - void* parent, - int32_t id, - bool fillBackground) + irr_gui_IGUIStaticText* + 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 rect = \ + irr::core::rect rect = irr::core::rect(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_drawAll(irr_gui_IGUIEnvironment* guienv) + { + ((irr::gui::IGUIEnvironment*)guienv)->drawAll(); + } }