本文整理汇总了C++中cegui::WindowManager::isWindowPresent方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowManager::isWindowPresent方法的具体用法?C++ WindowManager::isWindowPresent怎么用?C++ WindowManager::isWindowPresent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::WindowManager
的用法示例。
在下文中一共展示了WindowManager::isWindowPresent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: t
//-------------------------------------------------------------------------------------
bool
NetworkManager::connect(const CEGUI::EventArgs&)
{
CEGUI::WindowManager *winMgr = CEGUI::WindowManager::getSingletonPtr();
CEGUI::String Iptmp;
CEGUI::String PortTmp;
unsigned int i = 1;
if (winMgr->isWindowPresent("Connect/ContainerGrp/Ip"))
{
Iptmp = winMgr->getWindow("Connect/ContainerGrp/Ip")->getText();
PortTmp = winMgr->getWindow("Connect/ContainerGrp/Port")->getText();
this->ip_ = std::string(Iptmp.c_str());
this->port_ = StringToNumber<const char *, int>(PortTmp.c_str());
zappy::Convert *c = new zappy::Convert();
zappy::Network::initInstance(this->ip_ , this->port_, *c);
zappy::Network &p = zappy::Network::getInstance();
p.setParameters(this->port_, this->ip_);
p.connect_();
if (p.isConnected())
{
Thread<zappy::Network> t(p);
t.start();
while (p.gettingMap() && i < 5000)
usleep(++i);
this->GfxMgr_->hide("Connect");
this->GfxMgr_->createRealScene();
}
}
return true;
}
示例2:
//-------------------------------------------------------------------------------------
bool
NetworkManager::updateTime(const CEGUI::EventArgs&)
{
CEGUI::WindowManager *winMgr = CEGUI::WindowManager::getSingletonPtr();
std::string time;
std::string s;
if (winMgr->isWindowPresent("Time/Container/Time"))
{
zappy::Network &net = zappy::Network::getInstance();
time = winMgr->getWindow("Time/Container/Time")->getText().c_str();
s = "sst " + time + "\n";
net.setToSend(s);
}
return true;
}