Page 1 of 1

gui tree view for irrlicht

Posted: Sun Jan 23, 2005 5:25 pm
by osre
Hello there,

I just finished the upload of my tree view gui element for the irrlicht engine.
It's based on irrlicht 0.7.

If interessted look at:
http://www.r-ostermeier.de/irrlicht

please check that the case of "irrlicht" in the url is correct. Else the page will not be found :!: :?:

have fun, Reinhard.
:wink:

Posted: Mon Jan 24, 2005 4:03 am
by DarkWhoppy
Nice work 8)

Posted: Mon Jan 24, 2005 9:21 am
by Guest
thank you, I will extend it as soon as possible.

Posted: Mon Jan 24, 2005 12:36 pm
by Guest
Thank you very much! Next time, I will ask if somebody is already doing same thing I do. Man, you saved me some time :-)

Posted: Mon Jan 24, 2005 1:27 pm
by mohaps
user data for each node (void* pointer)
would not it be better to add a IUnknown* pointer so that you can grab/drop it ..for automatic reference counting... :)

Posted: Mon Jan 24, 2005 1:35 pm
by Electron
Personally I prefer void* s for user data. If IUnknown pointers are sued it means that you must derive all your classes from IUnknown if you want to set them as user data. void* gives the maximum flexibility, though of course ruins polymorphism.

Posted: Mon Jan 24, 2005 4:51 pm
by osre
As Electron said, void* is more flexible.
But about the IUnknown class:
I'am a Windows programmer using VC.net.
If I use any COM (OLE) component in my irrlicht program (MSXML, ...),
I can't write
using namespace irr;
because I will get an ambigous class name (IUnknown).

I think Microsoft will not change the name of the OLE IUnknown :? ,
so wouldn't it be better to change irr::IUnknown to something different?
May be irr::I_Unknown.
Or is there a better solution for this problem?

please think about it, Reinhard.

Posted: Tue Jan 25, 2005 10:54 pm
by turboferret
don't use

Code: Select all

using namespace irr;
;)

Posted: Sun Jan 30, 2005 10:55 am
by osre
I've just updated the gui tree view.

Extensions:
- 2nd data pointer of type IUnknown*
- additional collored icons (based on my new class IGUIImageList)
- new events
- minor fixes in visualization

Attetion :!:
it's not fully code compatible anymore. :oops:
But I will try to keep it compatible from now on. :wink:

As mentioned above I added a new class for image lists:
It uses a texture and tiles it in even sized images which can be accessed by index.

I also extended the bmp file loader to support 32 bit bmp files.

At last I also updated my irrlicht webpage:
http://www.r-ostermeier.de/irrlicht
It now has a bit of structure 8) and as much design as I was able to give it in about 4 hours.

have much more fun with my code as before.

Posted: Tue Feb 01, 2005 2:39 am
by DarkWhoppy
Do you have an demo? (an EXE to download)

Posted: Tue Feb 01, 2005 8:16 am
by osre
not at the moment.
But I will write one next weekend.
Just look at my webpage on sunday or monday.

Posted: Fri Feb 04, 2005 12:43 pm
by puh
http://www.irrlichtnx.mmdevel.de/phpBB2 ... .php?t=260
I think I've found a bug (at least in IrrlichtNX++ version):
try this code

Code: Select all


treeView = guienv->addTreeView( irr::core::rect<irr::s32>( 10, 30, 179, 170 ) ); 
tvnode = treeView->getRoot()->addChildBack( L"node 1" ); 
tvnode->setExpanded( true ); 
tvnode->addChildBack( L"node 1.1" ); 
tvnode->addChildBack( L"node 1.2" ); 
tvnode->getLastChild()->addChildBack( L"node 1.2.1" ); 
treeView->getRoot()->addChildBack( L"node 2" );	
And now try to click on the + - last child [node 2] disappear, isn't it?

Posted: Sat Feb 05, 2005 6:47 pm
by osre
now it's done.

The tree view demo is finished and ready for download at the download section on my site: http://www.r-ostermeier.de/irrlicht

I also removed some (many :roll: ) bugs from the tree view.
a short list:
- moveChildUp(), nodeChildDown() works now
- deleteChildNode() sets selectedNode = 0
- getNextVisible() works now in all cases (this is the bug found by puh)
- many visual defects in draw()

all bug fixes are in CGUITreeView.cpp

I hope this will help some of you.

Posted: Mon Feb 07, 2005 5:37 pm
by puh
Thanks, great work! :)

Posted: Wed Sep 21, 2005 6:59 pm
by puh
osre: :?: is it possible to change treeview control so that it could be added to the custom irr-project not to the irrlicht engine itself?
Would be much simplier to switch to next irr version.

(I did try to do it by myself but i'm not so good programmer :( )