i currently try to build my own set of widgets, running into problems.
First i create my own class MyGUIListbox taking a copy of the sources of CGUIListBox.
First i have some problems figuring out, how to make my own Widget visible. I was looking
for a container, to add my widget, but then
finally a had an idea. Setting the paramter IGUIElement* parent to the GUIEnvironment will add my Component to the GUIEnvironment, won't it ?
Code: Select all
IGUIEnvironment *gui = device->getGUIEnvironment();
MyListBox *listbox = new MyListBox(gui,(GUIElement*)gui,0,rect<s32>(0,0,200,400));
but when creating the instance, in the constructor of the baseclass IGUIElement, at the second line
Code: Select all
if (Parent)
Parent->addChild(this)
i got an Exception saying:
The Value if ESP was not properly saved across a function call. This is usally a result of
calling a function declared by one calling convention with a function pointer declared with
a different convention.
what have i done wrong ? Some Compiler-Switches wrong? I'm using VC++6.0