The quit button works fine. However, if I click on the button to open a window, the widget does not depress, no window appears, *and* it breaks the quit button, which will from then on not depress either.
This is the real kicker. Simply having a pointer to an IGUIWindow will break it. However, addFileOpenDialog() works fine.
I'm running 1.2 on Linux. The example compiles and runs fine. But this makes no sense to me.
Code: Select all
class EventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = device->getGUIEnvironment();
//IGUIWindow* window; //breaks
switch(event.GUIEvent.EventType)
{
case EGET_BUTTON_CLICKED:
switch(id)
{
case 101:
device->closeDevice();
return true;
break;
case 102:
//env->addFileOpenDialog(L"Please choose a file."); // works
//IGUIWindow* window; // breaks
//env->addWindow( rect<s32>(100, 100, 300, 200), false, L"Test window"); // breaks
return true;
break;
}
break;
}
return false;
}
}
};