GUI problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ZDeveloper
Posts: 35
Joined: Wed Mar 24, 2004 2:34 pm
Location: Germany
Contact:

GUI problem

Post by ZDeveloper »

I create GUI Element and some buttons etc.
But now I want to delete the buttons or to move them or to make them invisible.

How can I do that?
Look at http://www.z-software.de for interesting games.
fnolis

Post by fnolis »

the method remove() and setVisible() exists in baseclass IGUIElement...
joy
Posts: 124
Joined: Tue Apr 27, 2004 9:15 am
Location: Germany

Post by joy »

Hi,

do you want to delete and move buttons dynamicly? I mean do you run your program and than the user should be able to move and delete buttons? If yes I would solve this by I menu like in the techdemo. By clicking the object there should open a menu to delete the button. If you say yes you just need to drop() the button. Moving is a little bit more comlicated, because you have to write a drag and drop routine. I think you can take that from some examples too, because a button is a GUI Element too.

Could I help?
ZDeveloper
Posts: 35
Joined: Wed Mar 24, 2004 2:34 pm
Location: Germany
Contact:

Post by ZDeveloper »

No I want to have it static.
Thanks for help. I will try remove and setInvisible.
Look at http://www.z-software.de for interesting games.
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Not a good idea to drop() the button, it usually causes a crash. Let device->drop() deal with the cleaning up, just use remove() to remove permanantly or setVisible() to be able to switch between them.
ZDeveloper
Posts: 35
Joined: Wed Mar 24, 2004 2:34 pm
Location: Germany
Contact:

Post by ZDeveloper »

setVisible() works.

but remove make a problem.
first my text disaper, it is ok, but then the program ends because of an error.
Look at http://www.z-software.de for interesting games.
Post Reply