diff -Nauwr Irrlicht.old/CGUIWindow.cpp Irrlicht-Spintz/CGUIWindow.cpp --- Irrlicht.old/CGUIWindow.cpp 2005-03-01 14:43:45.053568219 +0100 +++ Irrlicht-Spintz/CGUIWindow.cpp 2005-03-12 07:22:16.000000000 +0100 @@ -17,7 +17,7 @@ //! constructor CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) -: IGUIWindow(environment, parent, id, rectangle), Dragging(false) +: IGUIWindow(environment, parent, id, rectangle), Dragging(false), HandleCloseButton(true) { #ifdef _DEBUG setDebugName("CGUIWindow"); @@ -75,7 +75,7 @@ else if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) { - if (event.GUIEvent.Caller == CloseButton) + if (HandleCloseButton && event.GUIEvent.Caller == CloseButton) { remove(); return true; @@ -191,6 +191,11 @@ IGUIElement::draw(); } +//! Disables the default close button handling +void CGUIWindow::handleCloseButton(bool handle) +{ + HandleCloseButton = handle; +} //! Returns pointer to the close button diff -Nauwr Irrlicht.old/CGUIWindow.h Irrlicht-Spintz/CGUIWindow.h --- Irrlicht.old/CGUIWindow.h 2005-03-01 14:43:45.058567511 +0100 +++ Irrlicht-Spintz/CGUIWindow.h 2005-03-12 07:21:44.000000000 +0100 @@ -29,6 +29,9 @@ //! draws the element and its children virtual void draw(); + //! Disables the default close button handling + virtual void handleCloseButton(bool handle); + //! Returns pointer to the close button virtual IGUIButton* getCloseButton(); @@ -42,6 +45,7 @@ core::position2d DragStart; bool Dragging; + bool HandleCloseButton; IGUIButton* CloseButton; IGUIButton* MinButton; diff -Nauwr Irrlicht.old/include/IGUIWindow.h Irrlicht-Spintz/include/IGUIWindow.h --- Irrlicht.old/include/IGUIWindow.h 2005-03-01 14:43:46.343385589 +0100 +++ Irrlicht-Spintz/include/IGUIWindow.h 2005-03-12 07:22:58.000000000 +0100 @@ -42,6 +42,9 @@ //! destructor virtual ~IGUIWindow() {}; + //! Disables the default close button handling + virtual void handleCloseButton(bool handle) = 0; + //! Returns pointer to the close button virtual IGUIButton* getCloseButton() = 0;