示例#1
0
	void FileDialog::notifyWindowButtonPressed(MyGUI::Window* _sender, const std::string& _name)
	{
		if (_name == "close")
		{
			eventEndDialog(this, false);
			onEndModal();
		}
	}
示例#2
0
	void Dialog::endModal()
	{
		MYGUI_ASSERT(mModal != false, "Already modal mode");
		mModal = false;

		mRootWidget->setVisible(false);

		MyGUI::InputManager::getInstance().removeWidgetModal(mRootWidget);
		DialogManager::getInstance()._removeDialog(this);

		onEndModal();
	}
示例#3
0
	void FileDialog::accept()
	{
		if (!mFolderMode)
		{
			mFileName = mEditFileName->getOnlyText();
			if (!mFileName.empty())
				eventEndDialog(this, true);
		}
		else
		{
			if (mListFiles->getIndexSelected() != MyGUI::ITEM_NONE)
			{
				common::FileInfo info = *mListFiles->getItemDataAt<common::FileInfo>(mListFiles->getIndexSelected());
				if (!common::isParentDir(info.name.c_str()))
					mCurrentFolder = common::concatenatePath (mCurrentFolder.asWStr(), info.name);
			}
			eventEndDialog(this, true);
		}

		onEndModal();
	}
示例#4
0
	void FileDialog::notifyCancel_Click(MyGUI::Widget* _sender)
	{
		eventEndDialog(this, false);
		onEndModal();
	}