本文整理汇总了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();
}
示例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;
}
示例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();
}
示例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();
}
示例5: hideChat
void GuiChat::hideChat()
{
CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(chatWindow->getChild("Editbox"));
editbox->deactivate();
chatWindow->deactivate();
}
示例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());
//.........这里部分代码省略.........