• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ cegui::ListboxItem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OnSearchRightMenuUpdate

//更新右搜索(筛选)菜单
bool OnSearchRightMenuUpdate(const CEGUI::EventArgs& e)
{
    CEGUI::Combobox* cbbox = WComboBox(WEArgs(e).window);
    cbbox->clearAllSelections();
    cbbox->resetList();
    cbbox->getEditbox()->setText("");

    //由索引关联商城类型
    SCGData::eSCType eShopCityType = GetShopCityTypeByTabContentSelIndex();
    //由索引关联商店类型,tabControl的索引0单独对应热销商品
    SCGData::eSType shoptype = GetShopTypeByTabContentSelIndex();
    if(shoptype == SCGData::TABTYPE_HOT)//热销没有筛选项
        return true;
    //根据商城和商店类型获取筛选数据
    SCGData* dt = GetInst(ShopCityMsgMgr).GetShopCityGoodsData();
    SCGData::MapFLDTA& mapSel = dt->GetFilterList();
    SCGData::MapUFLDTPA& mapUSel = mapSel[eShopCityType];
    SCGData::MapStrFilDTPA& mapStrSel = mapUSel[shoptype];
    SCGData::MapStrFilDTPA::iterator iter = mapStrSel.begin();
    for( ; iter != mapStrSel.end() ; ++iter)
    {
        //初始化筛选菜单
        string str = (*iter).first;
        //CEGUI::ListboxItem* lbi = new CEGUI::ListboxTextItem(str.c_str());
        CEGUI::ListboxItem* lbi = new CEGUI::ListboxTextItem(ToCEGUIString(str.c_str()));
        lbi->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
        if(iter == mapStrSel.begin() )//默认让第一个为选中项
            lbi->setSelected(true);
        cbbox->addItem(lbi);
    }
    return true;
}
开发者ID:,项目名称:,代码行数:33,代码来源:


示例2: grid_ref

_MEMBER_FUNCTION_IMPL(GUIMultiColumnList, getItem)
{
	CEGUI::MultiColumnList * pWindow = sq_getinstance<CEGUI::MultiColumnList *>(pVM);
	if(!pWindow)
	{
		sq_pushbool(pVM, false);
		return 1;
	}

	SQInteger sqiRow;
	SQInteger sqiColumn;

	sq_getinteger(pVM, -2, &sqiRow);
	sq_getinteger(pVM, -1, &sqiColumn);

	try
	{
		CEGUI::MCLGridRef grid_ref(sqiRow, sqiColumn);
		CEGUI::ListboxItem* pItem = pWindow->getItemAtGridReference(grid_ref);
		sq_pushstring(pVM, pItem->getText().c_str(), -1);
	}
	catch(...)
	{
		sq_pushbool(pVM, false);
	}
	return 1;
}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:27,代码来源:GUINatives.cpp


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


示例4: GetItemText

char* CGUIGridList_Impl::GetItemText ( int iRow, int hColumn )
{
    try
    {
        // Grab the item at the chosen row / column
        CEGUI::ListboxItem* pItem = reinterpret_cast < CEGUI::MultiColumnList* > ( m_pWindow ) -> getItemAtGridReference ( CEGUI::MCLGridRef ( iRow, GetColumnIndex ( hColumn ) ) );
        if ( pItem )
        {
            char *szRet = const_cast < char* > ( pItem->getText().c_str () );

            if ( !m_bIgnoreTextSpacer )
            {
                unsigned char ucSpacerSize = (unsigned char)(strlen ( CGUIGRIDLIST_SPACER ));

                if ( hColumn == 1 ) {
                    // Make sure there is a spacer to skip
                    if ( strncmp ( szRet, CGUIGRIDLIST_SPACER, strlen ( CGUIGRIDLIST_SPACER ) ) == 0 )
                        szRet += ucSpacerSize;
                }
            }

            return szRet;
        }
    }
    catch ( CEGUI::Exception )
    {
        return "";
    }

    return "";
}
开发者ID:,项目名称:,代码行数:31,代码来源:


示例5: addChildToList

void InspectWidget::addChildToList(Eris::Entity* child)
{
	CEGUI::String name(child->getType()->getName() + " ("+ child->getId() +" : "+child->getName()+")");
	CEGUI::ListboxItem* item = Gui::ColouredListItem::createColouredListItem(name);
	item->setUserData(child);
	mChildList->addItem(item);
}
开发者ID:,项目名称:,代码行数:7,代码来源:


示例6: OnSearchLeftMenuUpdate

//更新左搜索(导购)菜单
bool OnSearchLeftMenuUpdate(const CEGUI::EventArgs& e)
{
    CEGUI::Combobox* cbbox = WComboBox(WEArgs(e).window);
    cbbox->clearAllSelections();
    cbbox->resetList();
    cbbox->getEditbox()->setText("");
    //由索引关联商城类型
    SCGData::eSCType eCityType = GetShopCityTypeByTabContentSelIndex();
    SCGData* dt = GetInst(ShopCityMsgMgr).GetShopCityGoodsData();
    SCGData::MapGuideDataA& mapGuide = dt->GetGuideList();
    //根据索引获取导购数据
    SCGData::MapStrGGDTPA& mapGuideDTA = mapGuide[eCityType];
    CEGUI::Combobox* cbboxRight = WComboBox(GetWndMgr().getWindow(SHOPCITY_SEARCH_RIGHTWND_NAME));
    if(cbboxRight)
    {
        CEGUI::ListboxItem* lbi = cbboxRight->getSelectedItem();
        size_t idx = 0;
        if(lbi)
            idx = cbboxRight->getItemIndex(lbi);
        SCGData::MapStrGGDTPA::iterator iter = mapGuideDTA.begin();
        for(; iter != mapGuideDTA.end() ; ++iter)
        {
            //添加导购菜单
            string menuStr = iter->first;
            //CEGUI::ListboxItem* lbi = new CEGUI::ListboxTextItem(menuStr.c_str());
            CEGUI::ListboxItem* lbi = new CEGUI::ListboxTextItem(ToCEGUIString(menuStr.c_str()));
            lbi->setSelectionBrushImage(IMAGES_FILE_NAME,BRUSH_NAME);
            if(iter == mapGuideDTA.begin())//默认让第一个为选中
                lbi->setSelected(true);
            cbbox->addItem(lbi);
        }
    }
    return true;
}
开发者ID:,项目名称:,代码行数:35,代码来源:


示例7: Editor_Gold_Color_Select

bool cBonusBox::Editor_Gold_Color_Select(const CEGUI::EventArgs& event)
{
    const CEGUI::WindowEventArgs& windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>(event);
    CEGUI::ListboxItem* item = static_cast<CEGUI::Combobox*>(windowEventArgs.window)->getSelectedItem();

    Set_Goldcolor(Get_Color_Id(item->getText().c_str()));

    return 1;
}
开发者ID:Clever-Boy,项目名称:TSC,代码行数:9,代码来源:bonusbox.cpp


示例8: Editor_Direction_Select

bool cRokko::Editor_Direction_Select(const CEGUI::EventArgs& event)
{
    const CEGUI::WindowEventArgs& windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>(event);
    CEGUI::ListboxItem* item = static_cast<CEGUI::Combobox*>(windowEventArgs.window)->getSelectedItem();

    Set_Direction(Get_Direction_Id(item->getText().c_str()));

    return 1;
}
开发者ID:Clever-Boy,项目名称:TSC,代码行数:9,代码来源:rokko.cpp


示例9: 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


示例10: 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,代码来源:


示例11: ChildList_MouseDoubleClick

bool InspectWidget::ChildList_MouseDoubleClick(const CEGUI::EventArgs& args)
{
	//Inspect the child entity
	CEGUI::ListboxItem* item = mChildList->getFirstSelectedItem();
	if (item) {
		startInspecting(static_cast<EmberEntity*>(item->getUserData()));
	}

	return true;
}
开发者ID:,项目名称:,代码行数:10,代码来源:


示例12: entity_ChildRemoved

void InspectWidget::entity_ChildRemoved(Eris::Entity* entity)
{
	for (unsigned int i = 0; i < mChildList->getItemCount(); ++i) {
		CEGUI::ListboxItem* item = mChildList->getListboxItemFromIndex(i);
		if (item->getUserData() == entity) {
			mChildList->removeItem(item);
			break;
		}
	}
}
开发者ID:,项目名称:,代码行数:10,代码来源:


示例13: 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,代码来源:


示例14: 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


示例15: 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,代码来源:


示例16: Editor_Force_best_item_Select

bool cBonusBox::Editor_Force_best_item_Select(const CEGUI::EventArgs& event)
{
    const CEGUI::WindowEventArgs& windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>(event);
    CEGUI::ListboxItem* item = static_cast<CEGUI::Combobox*>(windowEventArgs.window)->getSelectedItem();

    if (item->getText().compare(UTF8_("Enabled")) == 0) {
        Set_Force_Best_Item(1);
    }
    else {
        Set_Force_Best_Item(0);
    }

    return 1;
}
开发者ID:Clever-Boy,项目名称:TSC,代码行数:14,代码来源:bonusbox.cpp


示例17: if

bool cBonusBox :: Editor_Item_Select( const CEGUI::EventArgs &event )
{
	const CEGUI::WindowEventArgs &windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>( event );
	CEGUI::ListboxItem *item = static_cast<CEGUI::Combobox *>( windowEventArgs.window )->getSelectedItem();

	if( item->getText().compare( UTF8_("Mushroom") ) == 0 )
	{
		Set_Bonus_Type( TYPE_MUSHROOM_DEFAULT );
	}
	else if( item->getText().compare( UTF8_("Fireplant") ) == 0 )
	{
		Set_Bonus_Type( TYPE_FIREPLANT );
	}
	else if( item->getText().compare( UTF8_("Mushroom Blue") ) == 0 )
	{
		Set_Bonus_Type( TYPE_MUSHROOM_BLUE );
	}
	else if( item->getText().compare( UTF8_("Mushroom Ghost") ) == 0 )
	{
		Set_Bonus_Type( TYPE_MUSHROOM_GHOST );
	}
	else if( item->getText().compare( UTF8_("Mushroom 1-UP") ) == 0 )
	{
		Set_Bonus_Type( TYPE_MUSHROOM_LIVE_1 );
	}
	else if( item->getText().compare( UTF8_("Star") ) == 0 )
	{
		Set_Bonus_Type( TYPE_STAR );
	}
	else if( item->getText().compare( UTF8_("Goldpiece") ) == 0 )
	{
		Set_Bonus_Type( TYPE_GOLDPIECE );
	}
	else if( item->getText().compare( UTF8_("Mushroom Poison") ) == 0 )
	{
		Set_Bonus_Type( TYPE_MUSHROOM_POISON );
	}
	else if( item->getText().compare( UTF8_("Random") ) == 0 )
	{
		Set_Bonus_Type( TYPE_POWERUP );
	}
	else
	{
		Set_Bonus_Type( TYPE_UNDEFINED );
	}

	Editor_State_Update();

	return 1;
}
开发者ID:sKabYY,项目名称:SMC,代码行数:50,代码来源:bonusbox.cpp


示例18: 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


示例19:

bool cStaticEnemy :: Editor_Fire_Resistant_Select( const CEGUI::EventArgs &event )
{
	const CEGUI::WindowEventArgs &windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>( event );
	CEGUI::ListboxItem *item = static_cast<CEGUI::Combobox *>( windowEventArgs.window )->getSelectedItem();

	if( item->getText().compare( UTF8_("Enabled") ) == 0 )
	{
		m_fire_resistant = 1;
	}
	else
	{
		m_fire_resistant = 0;
	}

	return 1;
}
开发者ID:as02700,项目名称:Eta-Chronicles,代码行数:16,代码来源:static.cpp


示例20: onSelect

bool FileWindow::onSelect(const CEGUI::EventArgs& e)
{
   CEGUI::ListboxItem* item = _pFileList->getFirstSelectedItem();
   if (item == NULL) { return true; }
   intptr_t data = reinterpret_cast< intptr_t >(item->getUserData());

   if (data == 0) { //file
      _pSelectBox->setText(item->getText());
      _pOkButton->setEnabled(true);
   } else if (data == 1) { //dir
      TCHAR* name = ::bootes::lib::util::TChar::C2T(item->getText().c_str());
      tc_string dir = _cwd + _T('\\') + name;
      delete name;
      list(dir.c_str());
   }
   return true;
}
开发者ID:dai1975,项目名称:BootesDances,代码行数:17,代码来源:FileWindow.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ cegui::ListboxTextItem类代码示例发布时间:2022-05-31
下一篇:
C++ cegui::Listbox类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap