gui tree view for irrlicht

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
osre
Posts: 5
Joined: Fri Sep 17, 2004 7:22 am
Location: Germany
Contact:

gui tree view for irrlicht

Post 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:
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

Nice work 8)
Programmer of the Irrlicht Scene Editor:
Homepage - Forum Thread
Version 2 on its way!!
Guest

Post by Guest »

thank you, I will extend it as soon as possible.
Guest

Post 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 :-)
mohaps
Posts: 248
Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:

Post 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... :)
---
Saurav Mohapatra
author, artist and bona fide geek

web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post 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.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
osre
Posts: 5
Joined: Fri Sep 17, 2004 7:22 am
Location: Germany
Contact:

Post 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.
turboferret
Posts: 49
Joined: Thu Aug 12, 2004 12:42 pm
Location: Sweden
Contact:

Post by turboferret »

don't use

Code: Select all

using namespace irr;
;)
This monkey is useless, it only has ONE ass!!!
osre
Posts: 5
Joined: Fri Sep 17, 2004 7:22 am
Location: Germany
Contact:

Post 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.
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

Do you have an demo? (an EXE to download)
Programmer of the Irrlicht Scene Editor:
Homepage - Forum Thread
Version 2 on its way!!
osre
Posts: 5
Joined: Fri Sep 17, 2004 7:22 am
Location: Germany
Contact:

Post by osre »

not at the moment.
But I will write one next weekend.
Just look at my webpage on sunday or monday.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post 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?
osre
Posts: 5
Joined: Fri Sep 17, 2004 7:22 am
Location: Germany
Contact:

Post 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.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Thanks, great work! :)
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post 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 :( )
Post Reply