Page 1 of 1

[Suggestion] WindowFrame destroy() should be close()?

Posted: Fri May 23, 2014 07:14
by Turbine
Generally consistency results in intuitive design.

Each WindowFrame has a CloseButton, therefore to close the window (not hide), a close() call would be the logical choice rather than destroy.

What do you think? Perhaps close() could just be an alias for destroy()?

Re: [Suggestion] WindowFrame destroy() should be close()?

Posted: Fri May 23, 2014 09:42
by Kulik
You can do whatever you want when the close button is clicked. Not everyone will want to just close the window. By default nothing happens and you have to subscribe to the event.

By WindowFrame you mean CEGUI::FrameWindow?

Using destroy() for widget destruction is consistent, using close() for just FrameWindow and destroy() for everything else would be inconsistent. I don't really see the point in this change.