本文整理汇总了C++中cegui::Editbox::activate方法的典型用法代码示例。如果您正苦于以下问题:C++ Editbox::activate方法的具体用法?C++ Editbox::activate怎么用?C++ Editbox::activate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Editbox
的用法示例。
在下文中一共展示了Editbox::activate方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleLbSelected
/***********************************************************
handle event when list is selected
***********************************************************/
bool ChatBox::HandleLbSelected (const CEGUI::EventArgs& e)
{
const CEGUI::ListboxTextItem * it = static_cast<const CEGUI::ListboxTextItem *>(_lb->getFirstSelectedItem());
std::string txt = it->getText().c_str();
if(txt == "New..")
{
_myChannels->show();
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/chooseChannel/edit"));
bed->activate();
_myChat->setEnabled(false);
}
else if(txt == "Whisper..")
{
_myChooseName->show();
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/choosePlayerName/edit"));
bed->activate();
_myChat->setEnabled(false);
}
else
{
CEGUI::PushButton * bch = static_cast<CEGUI::PushButton *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/bChannel"));
bch->setProperty("Text", it->getText());
_currSelectedch= (int)_lb->getItemIndex(it);
}
_lb->hide();
return true;
}
示例2: HandleAddFriend
/***********************************************************
handle event when add friend clicked
***********************************************************/
bool CommunityBox::HandleAddFriend(const CEGUI::EventArgs& e)
{
CEGUI::Listbox * lb = static_cast<CEGUI::Listbox *> (
CEGUI::WindowManager::getSingleton().getWindow("Community/friendlist"));
// check if we accept pending friend
const CEGUI::ListboxTextItem * it = static_cast<const CEGUI::ListboxTextItem *>(lb->getFirstSelectedItem());
if(it)
{
long fid = (long)it->getID();
T_friendmap::iterator itm = _friends.find(fid);
if(itm != _friends.end())
{
if(itm->second.first.ToAccept)
{
ThreadSafeWorkpile::getInstance()->AcceptFriend(fid);
return true;
}
}
}
// if not then we add a new friend
_myChooseName->show();
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/choosePlayerName/edit"));
bed->activate();
return true;
}
示例3: OpenSaleUI
bool OpenSaleUI()
{
CEGUI::WindowManager& wndmgr = GetWndMgr();
//获取出售订单ID
CEGUI::MultiColumnList* mcl = WMCL(wndmgr.getWindow("Auction/Tab/BuySale/BuyMCL"));
if(!mcl)
return false;
CEGUI::ListboxItem* lbi = mcl->getFirstSelectedItem();
if(!lbi)
{
//MessageBox(g_hWnd,AppFrame::GetText("AU_100"),"ERROR",MB_OK);
GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_100"),NULL,NULL,true);
return false;
}
CEGUI::Window* wnd = wndmgr.getWindow("Auction/SaleWnd");
wnd->setVisible(true);
wnd->setAlwaysOnTop(true);
CEGUI::Editbox* editbox = WEditBox(wnd->getChildRecursive("Auction/SaleWnd/saleNum"));//出售界面编辑框激活
editbox->activate();
AHdata& ah = GetInst(AHdata);
uint ID = lbi->getID();
ah.SetCanSaleID(ID);
return true;
}
示例4: activeSaisi
void Chat::activeSaisi()
{
d_root->activate();
CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(d_root->getChild("Editbox"));
editbox->activate();
}
示例5: 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();
}
示例6: 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();
}
示例7: historiqueBas
void GuiChat::historiqueBas()
{
CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(chatWindow->getChild("Editbox"));
d_historyPos = ceguimin(d_historyPos + 1, static_cast<int>(d_history.size()));
if (d_historyPos < static_cast<int>(d_history.size()))
{
editbox->setText(d_history[d_historyPos]);
editbox->setCaretIndex(static_cast<size_t>(-1));
}
else
{
editbox->setText("");
}
editbox->activate();
}
示例8: historiqueHaut
void GuiChat::historiqueHaut()
{
CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(chatWindow->getChild("Editbox"));
d_historyPos = ceguimax(d_historyPos - 1, -1);
if (d_historyPos >= 0)
{
editbox->setText(d_history[d_historyPos]);
editbox->setCaretIndex(static_cast<size_t>(-1));
}
else
{
editbox->setText("");
}
editbox->activate();
}
示例9: HandleCPOk
/***********************************************************
handle event when list is selected
***********************************************************/
bool CommunityBox::HandleCPOk (const CEGUI::EventArgs& e)
{
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/AddFriendName/edit"));
std::string strc = bed->getProperty("Text").c_str();
if(strc != "")
{
ThreadSafeWorkpile::getInstance()->AddFriend(strc);
bed->setProperty("Text", "");
_myChooseName->hide();
}
else
{
bed->activate();
}
return true;
}
示例10: HandleCPOk
/***********************************************************
handle event when list is selected
***********************************************************/
bool ChatBox::HandleCPOk (const CEGUI::EventArgs& e)
{
CEGUI::Editbox * bed = static_cast<CEGUI::Editbox *>
(CEGUI::WindowManager::getSingleton().getWindow("Chat/choosePlayerName/edit"));
std::string strc = bed->getProperty("Text").c_str();
if(strc != "")
{
AddWhisperChanel(strc);
bed->setProperty("Text", "");
_myChooseName->hide();
_myChat->setEnabled(true);
}
else
{
bed->activate();
}
return true;
}
示例11: OpenBuyUI
bool OpenBuyUI()
{
CEGUI::WindowManager& wndmgr = GetWndMgr();
CEGUI::MultiColumnList* mcl = WMCL(wndmgr.getWindow("Auction/Tab/BuySale/SaleMCL"));
if(!mcl)
return false;
CEGUI::ListboxItem* lbi = mcl->getFirstSelectedItem();
if(!lbi)
{
GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_102"),NULL,NULL,true);
return false;
}
CEGUI::Window* wnd = wndmgr.getWindow("Auction/BuyWnd");
wnd->setVisible(true);
wnd->setAlwaysOnTop(true);
CEGUI::Editbox* editbox = WEditBox(wnd->getChildRecursive("Auction/Buy/buyNum"));//购买界面编辑框激活
editbox->activate();
AHdata& ah = GetInst(AHdata);
//界面获取购买订单ID
uint ID = lbi->getID();
ah.SetCanBuyID(ID);//保存要购买的订单ID
return true;
}
示例12: showSaisi
void GuiChat::showSaisi()
{
chatWindow->activate();
CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(chatWindow->getChild("Editbox"));
editbox->activate();
}