当前位置: 首页>>代码示例>>C++>>正文


C++ Editbox::deactivate方法代码示例

本文整理汇总了C++中cegui::Editbox::deactivate方法的典型用法代码示例。如果您正苦于以下问题:C++ Editbox::deactivate方法的具体用法?C++ Editbox::deactivate怎么用?C++ Editbox::deactivate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cegui::Editbox的用法示例。


在下文中一共展示了Editbox::deactivate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: effaceSaisi

void Chat::effaceSaisi()
{
	// get the text entry editbox
	CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(d_root->getChild("Editbox"));
	editbox->setText("");
	editbox->deactivate();

}
开发者ID:quinsmpang,项目名称:xsilium-engine,代码行数:8,代码来源:GuiChat.cpp

示例2: handleMouse

bool Chat::handleMouse(const CEGUI::EventArgs& args)
{
	CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(d_root->getChild("Editbox"));
	editbox->deactivate();
	d_root->deactivate();

	return true;
}
开发者ID:quinsmpang,项目名称:xsilium-engine,代码行数:8,代码来源:GuiChat.cpp

示例3: Focus

void ChatBox::Focus(bool focus)
{
	CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
	(CEGUI::WindowManager::getSingleton().getWindow("Chat/edit"));

	if(focus)
		bed->activate();
	else
		bed->deactivate();
}
开发者ID:leloulight,项目名称:lbanet,代码行数:10,代码来源:ChatBox.cpp

示例4: setVisible

void GameConsoleWindow::setVisible(bool visible)
{
    m_ConsoleWindow->setVisible(visible);
    m_bConsole = visible;

    CEGUI::Editbox* editBox = (CEGUI::Editbox*) m_ConsoleWindow->getChild(sNamePrefix + "Editbox");
    if(visible)
       editBox->activate();
    else
       editBox->deactivate();
}
开发者ID:xcasadio,项目名称:casaengine,代码行数:11,代码来源:GameConsoleWindow.cpp

示例5: hideChat

void GuiChat::hideChat()
{
	CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(chatWindow->getChild("Editbox"));
	editbox->deactivate();
	chatWindow->deactivate();
}
开发者ID:quinsmpang,项目名称:xsilium-engine,代码行数:6,代码来源:GuiChat.cpp

示例6: HandleEnterKey

/***********************************************************
handle send button event
***********************************************************/
bool ChatBox::HandleEnterKey (const CEGUI::EventArgs& e)
{
	const CEGUI::KeyEventArgs& we =
    static_cast<const CEGUI::KeyEventArgs&>(e);

	const CEGUI::WindowEventArgs& wine =
    static_cast<const CEGUI::WindowEventArgs&>(e);


	if(we.scancode == CEGUI::Key::LeftControl || we.scancode == CEGUI::Key::RightControl)
	{
		_control_key_on = true;
		return true;
	}

	if(we.scancode == CEGUI::Key::LeftShift || we.scancode == CEGUI::Key::RightShift)
	{
		_shift_key_on = true;
		return true;
	}

	if(we.scancode == CEGUI::Key::LeftAlt || we.scancode == CEGUI::Key::RightAlt)
	{
		return true;
	}

	if(wine.window->getName() == "Chat/edit")
	{
		if(we.scancode == CEGUI::Key::Return)
		{
			HandleSend (e);

			CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
			(CEGUI::WindowManager::getSingleton().getWindow("Chat/edit"));
			bed->deactivate();
			return true;
		}

		if(we.scancode == CEGUI::Key::ArrowUp)
		{
			if(_itltext == _lasttexts.end())
				_itltext = _lasttexts.begin();
			else
			{
				std::list<std::string>::iterator ittmp = _itltext;
				++ittmp;
				if(ittmp != _lasttexts.end())
					++_itltext;
			}

			try
			{
				CEGUI::Window *windowchat = CEGUI::WindowManager::getSingleton().getWindow("Chat/edit");
				std::string text = "";
				if(_itltext != _lasttexts.end())
					text = *_itltext;

				if(windowchat)
					windowchat->setText((const unsigned char *)text.c_str());
			}
			catch(...){}

			//++_currSelectedch;
			//if(_currSelectedch >= (int)_channels.size())
			//	--_currSelectedch;
			//else
			//{
			//	std::list<std::string>::const_iterator it = _channels.begin();
			//	std::list<std::string>::const_iterator end = _channels.end();
			//	for(int cc=0; cc<_currSelectedch && it != end; ++it, ++cc);

			//	CEGUI::PushButton * bch = static_cast<CEGUI::PushButton *>
			//		(CEGUI::WindowManager::getSingleton().getWindow("Chat/bChannel"));
			//	bch->setProperty("Text", *it);
			//}



			return true;
		}
		if(we.scancode == CEGUI::Key::ArrowDown)
		{
			if(_itltext != _lasttexts.end())
			{
				if(_itltext != _lasttexts.begin())
					--_itltext;
				else
					_itltext = _lasttexts.end();
			}

			CEGUI::Window *windowchat = CEGUI::WindowManager::getSingleton().getWindow("Chat/edit");
			std::string text = "";
			if(_itltext != _lasttexts.end())
				text = *_itltext;

			if(windowchat)
				windowchat->setText((const unsigned char *)text.c_str());
//.........这里部分代码省略.........
开发者ID:leloulight,项目名称:lbanet,代码行数:101,代码来源:ChatBox.cpp


注:本文中的cegui::Editbox::deactivate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。