[fixed]tooltip on spinbox

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
ArakisTheKitsune
Posts: 73
Joined: Sat Jun 27, 2009 6:52 am

[fixed]tooltip on spinbox

Post by ArakisTheKitsune »

setToolTipText don't work on IGUISpinBox elements.
How no one noticed that before? :D
I am using 3033 svn version.

Here is code to reproduce:

Code: Select all

#include <irrlicht.h>

#pragma comment(lib, "Irrlicht.lib")

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

int _tmain(int argc, _TCHAR* argv[])
{

    IrrlichtDevice* device = createDevice( video::EDT_DIRECT3D9, dimension2d<u32>(640, 480), 16, false, false, false, 0);

    IVideoDriver* driver = device->getVideoDriver();
	ISceneManager* smgr = device->getSceneManager();
	IGUIEnvironment* guienv = device->getGUIEnvironment();

    IGUISpinBox* pSpinBox = guienv->addSpinBox(L"0", rect<s32>(260, 60, 310, 80));
    pSpinBox->setToolTipText(L"Some text");

    while(device->run())
	{
		driver->beginScene(true, true, SColor(255,100,101,140));

		smgr->drawAll();
		guienv->drawAll();

		driver->endScene();
	}

	device->drop();

	return 0;
}
Knowledge is power, understanding is wisdom.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Thanks for reporting. Seems to be a common problem with tooltips and guielements with sub-elements.

Please note that you should report bugs better in own threads. This thread is more for the recent changes in svn which accidentally broke something and such a bug can easily get lost in here.
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
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Should now be fixed and will be in Irrlicht 1.7.
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
ArakisTheKitsune
Posts: 73
Joined: Sat Jun 27, 2009 6:52 am

Post by ArakisTheKitsune »

Thank you so much :mrgreen:
Knowledge is power, understanding is wisdom.
ArakisTheKitsune
Posts: 73
Joined: Sat Jun 27, 2009 6:52 am

Post by ArakisTheKitsune »

In changes.txt there is "- Fix bug that menus on IGUIWindows with titlebar got drawn too high (id: 2714400)" ( tried and confirmed with edit box code below ) but ToolTipText on spin box is not working, is that intended behavior ?

When I replace this

Code: Select all

IGUISpinBox* pSpinBox = guienv->addSpinBox(L"0", rect<s32>(260, 60, 310, 80));
    pSpinBox->setToolTipText(L"Some text"); 
With this

Code: Select all

IGUIEditBox* pEditBox = guienv->addEditBox(L"0", rect<s32>(260, 60, 310, 80));
    pEditBox->setToolTipText(L"Some text");
And it work perfectly.
Knowledge is power, understanding is wisdom.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I suspect you did use the wrong version. The fix is so far only in svn in branches/releases/1.7 and it sounds as if you use some other version. It will be merged into svn/trunk soon.
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
ArakisTheKitsune
Posts: 73
Joined: Sat Jun 27, 2009 6:52 am

Post by ArakisTheKitsune »

Oh sorry I by default use svn/trunk version... my mistake.
Knowledge is power, understanding is wisdom.
Post Reply