#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<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(void* guienv)
+ void
+ irr_gui_drawAll(irr_gui_IGUIEnvironment* guienv)
{
((irr::gui::IGUIEnvironment*)guienv)->drawAll();
}