X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2FIGUIEnvironment.cpp;h=6fc3cfa05ae254ad8448fdf797fb5a4d8c12047c;hb=refs%2Fheads%2Fmaster;hp=927c0b986b943441ec061e29a687e49766e9fa92;hpb=bf35c1c5384d6ccae7b7690ee08c511d036ffaec;p=c-irrlicht.git diff --git a/src/IGUIEnvironment.cpp b/src/IGUIEnvironment.cpp index 927c0b9..6fc3cfa 100644 --- a/src/IGUIEnvironment.cpp +++ b/src/IGUIEnvironment.cpp @@ -28,28 +28,21 @@ extern "C" { irr_gui_addStaticText(irr_gui_IGUIEnvironment* guienv, const char* text, const irr_core_rect_s32* rectangle, - int border, - int wordWrap, + bool border, + bool wordWrap, irr_gui_IGUIElement* parent, - int id, - int fillBackground) + int32_t id, + bool 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(rectangle->x, - rectangle->y, - rectangle->x2, - rectangle->y2); + mbstowcs(wtext, text, strlen(text) + 1); // Add static text irr::gui::IGUIStaticText *staticText = ((irr::gui::IGUIEnvironment*)guienv) ->addStaticText(wtext, - rect, + *(irr::core::rect*)rectangle, border, wordWrap, (irr::gui::IGUIElement*)parent,