Bug: IGUIButton is clipped on startup, although set to be not clipped.
This might be also a problem of other elemnts, although this has not been tested.
Related to: 1.5.1
GUI setup (hierarchy):
Code: Select all
Window
-> Static Text
-> Button
Button is clipped on startup, renders completely after IGUIWindow is moved.
Example:
Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace gui;
int main(void)
{
IrrlichtDevice * pDevice = createDevice(video::EDT_DIRECT3D9,
core::dimension2di(800,600));
IGUIEnvironment * pEnv = pDevice->getGUIEnvironment();
IGUIWindow * pWnd = pEnv->addWindow(
core::recti(10,10, 410,210));
IGUIStaticText * pText = pEnv->addStaticText(L"",
core::recti(5, 20, 105, 120), true, false, pWnd);
IGUIButton * pBtn = pEnv->addButton(
core::recti(0,0,150,300), pText, -1, L"Button");
pBtn->setNotClipped(true);
while(pDevice->run())
{
pDevice->getVideoDriver()->beginScene();
pEnv->drawAll();
pDevice->getVideoDriver()->endScene();
}
pDevice->drop();
}