[GUI] Window options

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
Il_Drugo
Posts: 15
Joined: Fri Aug 18, 2006 1:57 pm

[GUI] Window options

Post by Il_Drugo »

How can I make a non-moveable window? and can I disable "close window" button or make it desappear?
miko93
Posts: 54
Joined: Sat Nov 12, 2005 5:24 pm
Location: Regensburg, Germany
Contact:

Post by miko93 »

Il_Drugo,

I remove the close-button like this

Code: Select all

irr::gui::IGUIButton* pB = m_pWindow->getCloseButton();
	pB->setVisible(false);
Greetings
miko
"Yessir, I'll be happy to make these unnecessary changes to this irrelevant document." (Dilbert)
Il_Drugo
Posts: 15
Joined: Fri Aug 18, 2006 1:57 pm

Post by Il_Drugo »

thx for your help, but it seems not working at all. No compilation errors, but button is still there. I'm using Irrlicht 1.1...maybe this can help...
kompadre
Posts: 8
Joined: Tue Aug 08, 2006 9:56 pm
Contact:

Post by kompadre »

Code: Select all

window->getCloseButton()->setVisible(false); 
, as pointed above, works on Irrlicht 1.0 (don´t know about 1.1).
Note: that you have to do this with every window you want to be unclosable.

As for "not-moveblness" I think the quickest way is to add a boolean property (like Movable) to the CGUIWindow class with its getter and setter. If you check it before assigning Dragging to true in CGUIWindow.cpp, you'll be able to deny dragging.
miko93
Posts: 54
Joined: Sat Nov 12, 2005 5:24 pm
Location: Regensburg, Germany
Contact:

Post by miko93 »

Hm, I checked and it works with 1.1 over here, too.
Il_Drugo, maybe you want to post some code?
"Yessir, I'll be happy to make these unnecessary changes to this irrelevant document." (Dilbert)
Post Reply