[fixed] IGUIButton and notClipped on Startup

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
MasterD
Posts: 153
Joined: Sun Feb 15, 2004 4:17 pm
Location: Lübeck, Germany
Contact:

[fixed] IGUIButton and notClipped on Startup

Post by MasterD »

While testing something other, I discovered a bug. Hopefully this hasn't been posted yet, since after a short search I didn't find anything directly related.

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 set to not clipped.
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();

}
YASS - Yet another Space Shooter
under Devolpment, see http://yass-engine.de
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Hm, yeah - I can reproduce it in 1.5.1 and seems to be fixed in 1.6 in svn.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply