Ejemplo n.º 1
0
//! adds a file open dialog. The returned pointer must not be dropped.
IGUIFileOpenDialog* CGUIEnvironment::addFileOpenDialog(const wchar_t* title,
                                                       bool modal,
                                                       IGUIElement* parent, s32 id)
{
	parent = parent ? parent : this;

	if (modal)
	{
		parent = new CGUIModalScreen(this, parent, -1);
		parent->drop();
	}

	IGUIFileOpenDialog* d = new CGUIFileOpenDialog(FileSystem, title,
	                                               this, parent, id);

	d->drop();
	return d;
}