void VideoDriver_Draw2DImageC(IntPtr videodriver, IntPtr texture, M_RECT destPos, M_RECT sourceRect, M_RECT clipRect, M_SCOLOR color1, M_SCOLOR color2, M_SCOLOR color3, M_SCOLOR color4, bool useAlphaChannelOfTexture) { SColor *colors = new SColor[4]; colors[0] = MU_SCOLOR(color1); colors[1] = MU_SCOLOR(color2); colors[2] = MU_SCOLOR(color3); colors[3] = MU_SCOLOR(color4); GetVideoFromIntPtr(videodriver)->draw2DImage((ITexture*)texture, MU_RECT(destPos), MU_RECT(sourceRect), &MU_RECT(clipRect), colors, useAlphaChannelOfTexture); delete[] colors; }
IntPtr GuiEnv_AddInOutFader(IntPtr guienv, M_RECT rectangle, IntPtr parent, int id) { if(rectangle != NULL) return GetGui(guienv)->addInOutFader(&MU_RECT(rectangle), (IGUIElement*)parent, id); else return GetGui(guienv)->addInOutFader(NULL, (IGUIElement*)parent, id); }
IntPtr GuiEnv_AddWindowW(IntPtr guienv, M_RECT rectangle, bool modal, wchar_t* text, IntPtr parent, int id) { return GetGui(guienv)->addWindow(MU_RECT(rectangle), modal, (text), (IGUIElement*)parent, id); }
IntPtr GuiEnv_AddStaticTextW(IntPtr guienv, wchar_t* text, M_RECT rectangle, bool border, bool wordWrap, IntPtr parent, int id, bool fillBack) { return GetGui(guienv)->addStaticText((text), MU_RECT(rectangle), border, wordWrap, (IGUIElement*)parent, id, fillBack); }
void GUIButton_SetPressedImage(IntPtr button, IntPtr image, M_RECT pos) { ((IGUIButton*)button)->setPressedImage((ITexture*)image, MU_RECT(pos)); }
IntPtr GuiEnv_AddTabControl(IntPtr guienv, M_RECT rectangle, IntPtr parent, bool fillbackGround, bool border, int id) { return GetGui(guienv)->addTabControl(MU_RECT(rectangle), (IGUIElement*)parent, fillbackGround, border, id); }
IntPtr GuiEnv_AddTab(IntPtr guienv, M_RECT rectangle, IntPtr parent, int id) { return GetGui(guienv)->addTab(MU_RECT(rectangle), (IGUIElement*)parent, id); }
void VideoDriver_EndSceneA(IntPtr videodriver, IntPtr windowId, M_RECT viewRect) { rect<s32> r = MU_RECT(viewRect); GetVideoFromIntPtr(videodriver)->endScene();//windowId, &r }
IntPtr GuiEnv_AddEditBoxW(IntPtr guienv, wchar_t* text, M_RECT rectangle, bool border, IntPtr parent, int id) { return GetGui(guienv)->addEditBox((text), MU_RECT(rectangle), border, (IGUIElement*)parent, id); }
IntPtr GuiEnv_AddListBox(IntPtr guienv, M_RECT rectangle, IntPtr parent, int id, bool drawBackground) { return GetGui(guienv)->addListBox(MU_RECT(rectangle), (IGUIElement*)parent, id, drawBackground); }
IntPtr GuiEnv_AddEditBox(IntPtr guienv, M_STRING text, M_RECT rectangle, bool border, IntPtr parent, int id) { return GetGui(guienv)->addEditBox(MU_WCHAR(text), MU_RECT(rectangle), border, (IGUIElement*)parent, id); }
IntPtr GuiEnv_AddWindow(IntPtr guienv, M_RECT rectangle, bool modal, M_STRING text, IntPtr parent, int id) { return GetGui(guienv)->addWindow(MU_RECT(rectangle), modal, MU_WCHAR(text), (IGUIElement*)parent, id); }
void VideoDriver_Draw2DImageB(IntPtr videodriver, IntPtr texture, M_POS2DS destPos, M_RECT sourceRect, M_SCOLOR color, bool useAlphaChannelOfTexture) { GetVideoFromIntPtr(videodriver)->draw2DImage((ITexture*)texture, MU_POS2DS(destPos), MU_RECT(sourceRect), 0, MU_SCOLOR(color), useAlphaChannelOfTexture); }
void VideoDriver_SetViewPort(IntPtr videodriver, M_RECT viewport) { GetVideoFromIntPtr(videodriver)->setViewPort(MU_RECT(viewport)); }
void GUIFont_DrawW(IntPtr font, wchar_t* text, M_RECT pos, M_SCOLOR color, bool hcenter, bool vcenter, M_RECT clip) { ((IGUIFont*)font)->draw((text), MU_RECT(pos), MU_SCOLOR(color), hcenter, vcenter, clip ? &(MU_RECT(clip)) : 0); }
IntPtr GuiEnv_AddButton(IntPtr guienv, M_RECT rectangle, IntPtr parent, int id, M_STRING text) { return GetGui(guienv)->addButton(MU_RECT(rectangle), (IGUIElement*)parent, id, MU_WCHAR(text)); }
IntPtr GuiEnv_AddCheckBoxW(IntPtr guienv, bool checked, M_RECT rectangle, IntPtr parent, int id, wchar_t* text) { return GetGui(guienv)->addCheckBox(checked, MU_RECT(rectangle), (IGUIElement*)parent, id, (text)); }
IntPtr GuiEnv_AddScrollBar(IntPtr guienv, bool horizontal, M_RECT rectangle, IntPtr parent, int id) { return GetGui(guienv)->addScrollBar(horizontal, MU_RECT(rectangle), (IGUIElement*)parent, id); }
IntPtr GuiEnv_AddImageW(IntPtr guienv, M_RECT rectangle, IntPtr parent, int id, wchar_t* text) { return GetGui(guienv)->addImage(MU_RECT(rectangle), (IGUIElement*)parent, id, (text)); }
void VideoDriver_Draw2DRectangle(IntPtr videodriver, M_RECT pos, M_SCOLOR colorLeftUp, M_SCOLOR colorRightUp, M_SCOLOR colorLeftDown, M_SCOLOR colorRightDown) { GetVideoFromIntPtr(videodriver)->draw2DRectangle(MU_RECT(pos), MU_SCOLOR(colorLeftUp), MU_SCOLOR(colorRightUp), MU_SCOLOR(colorLeftDown), MU_SCOLOR(colorRightDown)); }