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


C++ ListboxItem::getID方法代码示例

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


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

示例1: 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;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:26,代码来源:Auction.cpp

示例2: OnFolderListDoubleClicked

bool FolderSelector::OnFolderListDoubleClicked(const CEGUI::EventArgs&)
{
    CEGUI::ListboxItem* selectedItem = static_cast<CEGUI::ListboxItem*>(mFolderList->getFirstSelectedItem());
    if (selectedItem == 0)
        return false;
    ChangeFolder(mFolders[selectedItem->getID()]);
    UpdateFolderList();
    return true;
}
开发者ID:trietptm,项目名称:Ocerus,代码行数:9,代码来源:FolderSelector.cpp

示例3: OnCountryChanged

bool OnCountryChanged(const CEGUI::EventArgs& e)
{
    CEGUI::Combobox* cbb = WComboBox(WEArgs(e).window);
    CEGUI::ListboxItem* lti = cbb->getSelectedItem();
    if(lti)
        CREvent::SetSelectCountry(lti->getID());
    else
        CREvent::SetSelectCountry(1);//range由Data/CountryList.xml 配置决定,这里根据配置设置默认国家ID为1
    return true;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例4: OnHairColorChanged

bool OnHairColorChanged(const CEGUI::EventArgs& e)
{
    CEGUI::Combobox* cbb = WComboBox(WEArgs(e).window);
    CEGUI::ListboxItem* lti = cbb->getSelectedItem();
    if(lti)
        CREvent::SetHairColor(lti->getID());
    else
        CREvent::SetHairColor(0);
    return true;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例5: fillElementFromGui

void AreaAdapter::fillElementFromGui()
{
	//Start by using the shape element from the polygon adapter
	mEditedValue = ::Atlas::Message::MapType();
	CEGUI::ListboxItem* item = mLayerWindow->getSelectedItem();
	if (item) {
		mLayer = item->getID();
	}
	Terrain::TerrainAreaParser parser;
	mEditedValue = parser.createElement(mPolygonAdapter->getShape(), mLayer);
}
开发者ID:sajty,项目名称:ember,代码行数:11,代码来源:AreaAdapter.cpp

示例6: OnShopCityTwitterMouseDoubleClicked

//双击推荐列表,打开购买页面
bool OnShopCityTwitterMouseDoubleClicked(const CEGUI::EventArgs& e)
{
    CEGUI::Listbox* twitterList = WListBox(WEArgs(e).window);
    CEGUI::ListboxItem* lbi = twitterList->getFirstSelectedItem();
    if(lbi)
    {
        uint index = lbi->getID();//获取索引,索引关联物品索引
        CEGUI::Window* buyPage = GetWindow(SHOPCITY_BUY_PAGE_NAME);
        buyPage->setID(index);//购买界面ID与物品索引关联
        //打开购买界面
        FireUIEvent(SHOPCITY_BUY_PAGE_NAME,EVENT_OPEN);
    }
    return true;
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例7: Submit

void FolderSelector::Submit()
{
    if (mCallback.IsSet())
    {
        CEGUI::ListboxItem* selectedItem = static_cast<CEGUI::ListboxItem*>(mFolderList->getFirstSelectedItem());
        if (selectedItem != 0)
        {
            ChangeFolder(mFolders[selectedItem->getID()]);
        }
        const string& path = GetRelativePath(mCurrentPath);
        const string& editboxValue = mEditbox->getText().c_str();
        mCallback.Call(path, editboxValue, false, mTag);
    }
    delete this;
}
开发者ID:trietptm,项目名称:Ocerus,代码行数:15,代码来源:FolderSelector.cpp

示例8: OnCancelAgentOrder

//撤销委托订单事件
bool OnCancelAgentOrder(const CEGUI::EventArgs& e)
{
	CEGUI::WindowManager& mgr = GetWndMgr();
	CEGUI::MultiColumnList* mcl = WMCL(mgr.getWindow("Auction/Tab/Query/MCL"));
	//获得选中Item对应的订单ID
	CEGUI::ListboxItem* li = mcl->getFirstSelectedItem();
	if(!li)
	{
		/***********************************************************************/
		/* zhaohang fix 2010-9-3
		/* 修改消息框形式,采用封装的MsgEventManager,以及新的字符资源加载方式Appframe
		/***********************************************************************/
		GetInst(MsgEventManager).PushEvent(Msg_Ok,AppFrame::GetText("AU_113"),NULL,NULL,true);
		return false;
	}
	uint orderID = li->getID();
	AHdata& ah = GetInst(AHdata);
	ah.Send_AH_REMOVE_AGENT(orderID);
	return true;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:21,代码来源:Auction.cpp

示例9: OnSexChanged

bool OnSexChanged(const CEGUI::EventArgs& e)
{
    CEGUI::Combobox* cbb = WComboBox(WEArgs(e).window);
    CEGUI::ListboxItem* lti = cbb->getSelectedItem();
    if(lti)
    {
        CREvent::SetSelectSex(lti->getID());
        //更改性别后,修改默认Face和HairStyle,使得模型能够正常显示
        CREvent::SetFace(0);
        CREvent::SetHairStyle(0);
    }
    else
    {
        CREvent::SetSelectSex(0);
        //更改性别后,修改默认Face和HairStyle,使得模型能够正常显示
        CREvent::SetFace(0);
        CREvent::SetHairStyle(0);
    }
    ResetDataBySexSelChanged();
    return true;
}
开发者ID:,项目名称:,代码行数:21,代码来源:

示例10: 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;
}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:23,代码来源:Auction.cpp


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