Hi, I'd like to create an inventory for my game, by creating an inventoryWindow class, who derives from the IGUIWindow class. But I don't know how to create my own window inheriting of IGUIWindow.
class InventoryWindow : public irr::gui::IGUIWindow
{
/*
**
** code
**
*/
};
But when I create an instance, the compiler said that the class is abstract, and effectively there are some functions in IGUIWindow who are pure virtual and I don't know how to implement these functions.
So what is the method to implement my own window who derived from IGUIWindow? Thanks.
What you want to do is probably to derive from CGUIWindow. CGUIWindow derives from IGUIWindow, so to get a fully working window(while deriving from IGUIWindow) you need to implement everything that CGUIWindow implements, plus your extras.
The easiest solution would liekly be to copy the source from CGUIWindow (\source\Irrlight\CGUIWindow.*), give the class a different name and add your own extras.
Luben wrote:What you want to do is probably to derive from CGUIWindow. CGUIWindow derives from IGUIWindow, so to get a fully working window(while deriving from IGUIWindow) you need to implement everything that CGUIWindow implements, plus your extras.
The easiest solution would liekly be to copy the source from CGUIWindow (\source\Irrlight\CGUIWindow.*), give the class a different name and add your own extras.
I saw the CGUIWindow but I was not sure if it was a good solution.
So thank you, I do that