I need to be able to either hide the X or the prefered option would be a way of cancelling the window closure and then hiding it instead. The reason is, i would like to maintain the data that has been set in a tools dialogue.
I have an event that fires like this already to record it's last position:
case irr::gui::EGET_ELEMENT_CLOSED:
if (id == TOOLSDIAG)
{
windowposX = ((irr::gui::IGUIWindow*)event.GUIEvent.Caller)->getRelativePosition().UpperLeftCorner.X;
windowposY = ((irr::gui::IGUIWindow*)event.GUIEvent.Caller)->getRelativePosition().UpperLeftCorner.Y;
}
case irr::gui::EGET_ELEMENT_CLOSED:
{
if (id == 5000)
{
((irr::gui::IGUIWindow*)event.GUIEvent.Caller)->setVisible(false);
i want something here like event.cancel() or something
}