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


C++ TableViewCell::autorelease方法代码示例

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


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

示例1: tableCellAtIndex

TableViewCell* TableViewTest::tableCellAtIndex(TableView *table, ssize_t idx)
{
    auto string = String::createWithFormat("%ld", idx);
    TableViewCell *cell = table->dequeueCell();
    if (!cell) {
        cell = new (std::nothrow) CustomTableViewCell();
        cell->autorelease();
        auto sprite = Sprite::create("Images/Icon.png");
        sprite->setAnchorPoint(Vec2::ZERO);
        sprite->setPosition(Vec2(0, 0));
        cell->addChild(sprite);

        auto label = Label::createWithSystemFont(string->getCString(), "Helvetica", 20.0);
        label->setPosition(Vec2::ZERO);
		label->setAnchorPoint(Vec2::ZERO);
        label->setTag(123);
        cell->addChild(label);
    }
    else
    {
        auto label = (Label*)cell->getChildByTag(123);
        label->setString(string->getCString());
    }


    return cell;
}
开发者ID:AomXD,项目名称:workspace,代码行数:27,代码来源:TableViewTestScene.cpp

示例2: tableCellAtIndex

TableViewCell* SkillTableView::tableCellAtIndex(TableView *table, ssize_t idx)
{
    CCString* str = CCString::createWithFormat("ui/skill/skill_%d.png",2001 + (int)idx);
    TableViewCell* cell = table->dequeueCell();
    if (!cell)
    {
        cell = new TableViewCell();
        cell->autorelease();
        
        Scale9Sprite* bg = Scale9Sprite::create("ui/cell.png");
        bg->setAnchorPoint(Point::ZERO);
        bg->setPosition(Point::ZERO);
        bg->setPreferredSize(Size(420, 80));
        cell->addChild(bg);
        
        Sprite* skill = Sprite::create(str->getCString());
        skill->setPosition(Point(50, 40));
        cell->addChild(skill, 0, 123);
        m_skillVec.push_back(skill);
    }
    else
    {
        Sprite* skill = (Sprite*)cell->getChildByTag(123);
        Texture2D* texture = Director::getInstance()->getTextureCache()->addImage(str->getCString());
        skill->setTexture(texture);
    }
    cell->setTag(2001+(int)idx);
    return cell;
}
开发者ID:gujianhesong,项目名称:GujianDream,代码行数:29,代码来源:SkillTableView.cpp

示例3: tableCellAtIndex

TableViewCell* TableViewTestLayer::tableCellAtIndex(TableView *table, unsigned int idx)
{
    String *string = String::createWithFormat("%d", idx);
    TableViewCell *cell = table->dequeueCell();
    if (!cell) {
        cell = new CustomTableViewCell();
        cell->autorelease();
        Sprite *sprite = Sprite::create("Images/Icon.png");
        sprite->setAnchorPoint(Point::ZERO);
        sprite->setPosition(Point(0, 0));
        cell->addChild(sprite);

        LabelTTF *label = LabelTTF::create(string->getCString(), "Helvetica", 20.0);
        label->setPosition(Point::ZERO);
		label->setAnchorPoint(Point::ZERO);
        label->setTag(123);
        cell->addChild(label);
    }
    else
    {
        LabelTTF *label = (LabelTTF*)cell->getChildByTag(123);
        label->setString(string->getCString());
    }


    return cell;
}
开发者ID:aberaud,项目名称:cocos2d-x,代码行数:27,代码来源:TableViewTestScene.cpp

示例4: tableCellAtIndex

//生成列表每一项的内容
TableViewCell* RankScene::tableCellAtIndex(TableView *table, ssize_t idx)
{
	Size mysize = Director::getInstance()->getVisibleSize();
	Vec2 origin = Director::getInstance()->getVisibleOrigin();

	//读取数据
	string str = opt + "_" + Global::shareGlobal()->iToS(idx + 1, 0);

	TableViewCell* cell = table->cellAtIndex(idx);
	if (!cell)
	{
		cell = new TableViewCell();
		cell->autorelease();

		Sprite *item = Sprite::create("tb.png");
		item->setPosition(Vec2(origin.x + 180, 15));
		cell->addChild(item);

		string data = CCUserDefault::sharedUserDefault()->getStringForKey(str.c_str(), "");

		//cocos2d::CCMessageBox(t.c_str(),num.c_str());
		//return cell;

		if (data != "")
		{
			string t = "";
			string num = "";
			string score = "";
			int i = 0;
			while (data[i] != ' ') t += data[i++]; i++; //时间
			while (data[i] != ' ') num += data[i++]; i++; //步数
			while (i < (int)data.length()) score += data[i++]; //分数


			Label *item1 = Label::createWithTTF(Global::shareGlobal()->iToS(idx + 1, 0).c_str(), "fonts/arial.ttf", 18);
			Label *item2 = Label::createWithTTF(t.c_str(), "fonts/arial.ttf", 18);
			Label *item3 = Label::createWithTTF(num.c_str(), "fonts/arial.ttf", 18);
			Label *item4 = Label::createWithTTF(score.c_str(), "fonts/arial.ttf", 18);

			item1->setPosition(Vec2(origin.x + 30, 15));
			item2->setPosition(Vec2(origin.x + 120, 15));
			item3->setPosition(Vec2(origin.x + 210, 15));
			item4->setPosition(Vec2(origin.x + 300, 15));

			cell->addChild(item1);
			cell->addChild(item2);
			cell->addChild(item3);
			cell->addChild(item4);
		}
	}
	return cell;
}
开发者ID:PhamDinhTri,项目名称:Cocos_Sudoku,代码行数:53,代码来源:Rank.cpp

示例5: tableCellAtIndex

TableViewCell* GameChallengeMap::tableCellAtIndex(TableView* table,ssize_t idx)
{
	std::string id = StringUtils::format("%d", idx+1);
	TableViewCell *cell = table->dequeueCell();

	if (1) {
		cell = new TableViewCell();
		cell->autorelease();

		Sprite* bg = Sprite::create(RESOURCE("map_002.png"));
		if (idx%2) {
			bg->setTexture(RESOURCE("map_001.png"));
		}
		bg->setFlippedX(fileMap);

		bg->setAnchorPoint(Point(0, 0));
		bg->setTextureRect(Rect(0,0,window_size.width,window_size.height));

		cell->addChild(bg);

		// ID部分
		auto *label = Label::createWithSystemFont(id.c_str(), "Arial", 20);
		label->setAnchorPoint(Point(0, 0));
		label->setPosition(Point(50, 0));
		label->setColor(Color3B(0,0,0));
		cell->addChild(label);

		if (idx>=(12-ci_NormalMissionNum/10))	//如果130关,就是13,但必须是10的整数倍
		{
			int missionId=120-idx*10;	//本单元最大关卡ID
			for (int i=0;i<10;++i)
			{
				GameChallengeMission* mission = GameChallengeMission::create();
				mission->setTag(missionId);
				mission->setAnchorPoint(Vec2::ZERO);
				//取得关卡ID对应的坐标
				Vec2 temp=GameUIData::getInstance()->getNormalMissionPos(missionId);
				mission->setPosition(temp);
				cell->addChild(mission);

				mission->setMissionPorperty(missionId);
				mission->missionShow(missionId);

				--missionId;
			}
		}

	}

	return cell;
}
开发者ID:SIM0NL1,项目名称:DND,代码行数:51,代码来源:GameChallengeMap.cpp

示例6:

TableViewCell *TableView::dequeueCell()
{
    TableViewCell *cell;

    if (_cellsFreed.empty()) {
        cell = nullptr;
    } else {
        cell = _cellsFreed.at(0);
        cell->retain();
        _cellsFreed.erase(0);
        cell->autorelease();
    }
    return cell;
}
开发者ID:TheWindShan,项目名称:HYFish,代码行数:14,代码来源:CCTableView.cpp

示例7: tableCellAtIndex

TableViewCell* GCScoreTable::tableCellAtIndex(cocos2d::extension::TableView *table, ssize_t idx)
{
    TableViewCell* cell = table->dequeueCell();
    if(!cell)
    {
        cell = new TableViewCell();
        cell->autorelease();
    }
    cell->removeAllChildrenWithCleanup(true);
    log("idx = %zd",idx);
    
    Ref* data = _result->getData().at(idx);
    Layer* item = this->createCell(data, idx);
    cell->addChild(item);
    
    return cell;
}
开发者ID:eugeneus,项目名称:indi-a,代码行数:17,代码来源:GCScoreTable.cpp

示例8: tableCellAtIndex

TableViewCell* SceneRule::tableCellAtIndex(TableView *table, ssize_t idx)
{
    TableViewCell *cell = table->dequeueCell();
    if (cell) {
        cell->removeAllChildrenWithCleanup(true);
        
    }
    
    cell = new TableViewCell();
    cell->autorelease();
    QAKind *gk = listQAKind.at(idx);
    std::string title = gk->getTitle();
    Vector<MenuItem *> itemArray;
    
    auto item = GameTool::addBtn2(&itemArray, title, 30, Point(cellWidth/2, cellHeight/2), ANCHOR_CENTER_CENTER, CC_CALLBACK_1(SceneRule::callbackBtn, this));
    item->setTag((int)idx);
    
    KUtil::addMenu(cell, &itemArray, 30);
    return cell;
}
开发者ID:keltonxian,项目名称:BigTwo,代码行数:20,代码来源:SceneRule.cpp

示例9: tableCellAtIndex

// セルの内容を設定
TableViewCell* Overview::tableCellAtIndex(TableView *table, ssize_t idx){
    std::string id = StringUtils::format("%zd", idx);
    std::string text = StringUtils::format("Line %zd", idx);
    TableViewCell *cell = table->dequeueCell();
    
    cell = new TableViewCell();
    cell->autorelease();
    
    
    // セルの背景
    auto background_color = Color3B(255,255,255);
    if (idx%2) {
        background_color = Color3B(200,200,200);
    }
    
    Sprite* bg = Sprite::create();
    bg->setAnchorPoint(Point(0, 0));
    bg->setTextureRect(Rect(0, 0, window_size.width, 24));
    bg->setColor(background_color);
    bg->setTag(100);
    cell->addChild(bg, 0);
    
    // ボーダーライン
    Sprite* line = Sprite::create();
    line->setAnchorPoint(Point(0, 0));
    line->setTextureRect(Rect(0, 0, window_size.width, 1));
    line->setColor(Color3B(0,0,0));
    cell->addChild(line, 1);
    
    //Story取得
    auto story = story_list.begin() + idx;
    
    // ID部分
    auto *label_1 = LabelTTF::create(story.operator*()->getTitle().c_str(), "Arial", 16);
    label_1->setAnchorPoint(Point(0, 0));
    label_1->setPosition(Point(10, 0));
    label_1->setColor(Color3B(0,0,0));
    cell->addChild(label_1, 1);
     
    return cell;
}
开发者ID:raharu0425,项目名称:Abyss,代码行数:42,代码来源:Overview.cpp

示例10: tableCellAtIndex

TableViewCell* MainScene::tableCellAtIndex(TableView *table, ssize_t idx)
{
	TableViewCell *cell = cell = new (std::nothrow) CustomTableViewCell();
	cell->autorelease();
	auto sprite = Sprite::create(menuImages[idx%length]);
	sprite->setAnchorPoint(Vec2::ZERO);
	sprite->setPosition(Vec2(0, 0));
	cell->addChild(sprite);

	cell->setContentSize(Size(100,200));
	sprite->setContentSize(Size(110,200));
	Size cellSize = cell->getContentSize();
	auto label = Label::createWithSystemFont(menuTitile[idx%length], "微软雅黑", 16);
	Size lableSize = label->getContentSize();

	label->setPosition(50, 30);
	label->setTag(123);
	cell->addChild(label);

	return cell;
}
开发者ID:newhope1106,项目名称:cocos2d-x-sample,代码行数:21,代码来源:MainScene.cpp

示例11: tableCellAtIndex

TableViewCell* TaskDialog::tableCellAtIndex(cocos2d::extension::TableView *table, ssize_t idx)
{
	TableViewCell *cell = table->dequeueCell();
	if (!cell)
	{
		cell = new TableViewCell();
		cell->autorelease();
		if (tableViewCellNode)
		{
			tableViewCellNode->setTag(10);
			int h = tableViewCellNode->getContentSize().height;
			h = h>tableViewSize.height?h:tableViewSize.height;
			tableViewCellNode->setPosition(ccp(0, h));
			cell->addChild(tableViewCellNode);
		}
	}
	else
	{
		int h = tableViewCellNode->getContentSize().height;
		h = h>tableViewSize.height?h:tableViewSize.height;
		tableViewCellNode->setPosition(ccp(0, h));
	}
	return cell;
}
开发者ID:lure9999,项目名称:Nodie,代码行数:24,代码来源:TaskDialog.cpp

示例12: tableCellAtIndex

TableViewCell* CMyTableView::tableCellAtIndex(TableView *table, ssize_t idx)
{
    const int tagLabel = 666;
    const int tagSprite = 777;
    bool hasData = true;
    TableViewCell *pCell = table->dequeueCell();
    if( !pCell )
    {
        pCell = new TableViewCell();
        pCell->autorelease();
        hasData = false;
    }
    else
    {
        pCell->removeChildByTag( tagSprite );
        if( idx != m_lastTouchIdx && pCell->getChildByTag(E_Tag_SelectBg) )
        {
            pCell->removeChildByTag( E_Tag_SelectBg );
        }
    }

    if( idx >= m_viewData.size() )
    {
        CCLog( "[CMyTableView::tableCellAtIndex]Error. idx(%d) greater than data.Size(%d)", (int)idx, (int)m_viewData.size() );
        return NULL;
    }

    int off = 5;
    int x = off;
    CCSprite *pSprite = NULL;
    if( m_viewData[idx].useRect )
    {
        pSprite = CCSprite::create( m_viewData[idx].icon.c_str(), m_viewData[idx].iconRect );
    }
    else
    {
        pSprite = CCSprite::create( m_viewData[idx].icon.c_str() );
    }
    if( pSprite )
    {
        CCSize sz = pSprite->getContentSize();
        float scale = m_cellSz.height / sz.height;
        sz = sz * scale;
        pSprite->setScale( scale );
        pSprite->setPosition(
            ccp( sz.width/2 + off, m_cellSz.height/2) );
        pCell->addChild( pSprite, 1, tagSprite );
        x += (pSprite->getContentSize().width * scale) + off;
    }
    else
    {
        CCLog( "[CMyTableView::tableCellAtIndex]Error. can not load sprite:%s", m_viewData[idx].icon.c_str() );
    }

    CCLabelTTF *pLabel = NULL;
    if( hasData )
    {
        pLabel = (CCLabelTTF*)pCell->getChildByTag( tagLabel );
        CCAssert( pLabel, "get label child error" );
        pLabel->setString( m_viewData[idx].text.c_str() );
    }
    else
    {
        pLabel = CCLabelTTF::create( m_viewData[idx].text.c_str(), "Arial", 20.0 );
        pCell->addChild( pLabel, 1 );
    }

    if( pLabel )
    {
        pLabel->setAnchorPoint( ccp(0.5, 0.5) );
        pLabel->setPosition( ccp(x + pLabel->getContentSize().width/2, m_cellSz.height/2) );
        pLabel->setTag( tagLabel );
        pLabel->setColor( ccBLACK );
    }

    // 判断是否要重新加上选中的背景
    if( idx == m_lastTouchIdx && !pCell->getChildByTag(E_Tag_SelectBg) )
    {
        _AddSelectBg( pCell );
        m_lastTouchCell = pCell;
    }

    pCell->setUserData( m_viewData[idx].data );

    return pCell;
}
开发者ID:mjssw,项目名称:myproj,代码行数:86,代码来源:MyTableView.cpp

示例13: tableCellAtIndex

//设计单元格内容;
TableViewCell* OverTableView::tableCellAtIndex(TableView *table,ssize_t idx)
{
	CCLOG(" ~(^OO^)~  %d",idx);
    std::string id = StringUtils::format("%ld", idx+1);
    TableViewCell *cell = table->dequeueCell();

	cell = new TableViewCell();
	cell->autorelease();
	cell->setLocalZOrder(idx+1);
	string filename = StringUtils::format("mapbg/map_00%ld.png",ci_MapNum-(idx)%ci_MapNum);

	Sprite* bg_left = Sprite::create(RESOURCE(filename));
	bg_left->setFlippedX(false);
	bg_left->setAnchorPoint(Point(0, 0));
	bg_left->setPosition(Vec2::ZERO);
	cell->addChild(bg_left);
	if (!idx)
	{
		Sprite* expect = Sprite::create(RESOURCE("mapbg/map_jqqd.png"));
		expect->setAnchorPoint(Vec2(0.5f,0.5f));
		expect->setPosition(Vec2(GLB_SIZE.width*0.5,GLB_SIZE.height-300));
		bg_left->addChild(expect,Z_First);
	}

	Sprite* bg_right = Sprite::create(RESOURCE(filename));
	bg_right->setFlippedX(true);
	bg_right->setAnchorPoint(Point(0, 0));
	bg_right->setPosition(Vec2(639,0));
	cell->addChild(bg_right);
	if (!idx)
	{
		Sprite* expect = Sprite::create(RESOURCE("mapbg/map_jqqd.png"));
		expect->setAnchorPoint(Vec2(0.5f,0.5f));
		expect->setPosition(Vec2(GLB_SIZE.width*0.5,GLB_SIZE.height-300));
		bg_right->addChild(expect,Z_First);
	}

	// ID部分
	auto *label_left = Label::createWithSystemFont(id.c_str(),"Arial",20);
	label_left->setAnchorPoint(Point(0, 0));
	label_left->setPosition(Point(50, 0));
	label_left->setColor(Color3B(0,0,0));
	//cell->addChild(label_left);

	auto *label_right = Label::createWithSystemFont(id.c_str(),"Arial",20);
	label_right->setAnchorPoint(Point(0, 0));
	label_right->setPosition(Point(50+639, 0));
	label_right->setColor(Color3B(0,0,0));
	//cell->addChild(label_right);

// 	vec_normalMissionBack.clear();
// 	for (int i=0;i<vec_normalMission.size();i++)
// 	{
// 		vec_normalMissionBack.push_back(vec_normalMission.at(i));
// 	}

	vec_normalMission.clear();
	m_mapNormalMission[idx].clear();

	//布置普通关卡;
	if (idx>=ci_MapNum-ci_NormalMissionNum/10)	//如果130关,就是13,但必须是10的整数倍;
	{
		int missionId=10*ci_MapNum-idx*10;	//本单元最大关卡ID;
		for (int i=0;i<10;++i)
		{
			GameNormalMission* mission_left = GameNormalMission :: create();
			mission_left->m_nMissionId = missionId;
			mission_left->setTag(missionId);
			mission_left->setAnchorPoint(Vec2::ZERO);
			//取得关卡ID对应的坐标;
			Vec2 temp=GameUIData::getInstance()->getNormalMissionPos(missionId);
			mission_left->setPosition(temp);
			cell->addChild(mission_left);

			vec_normalMission.push_back(mission_left);
			
			mission_left->setMissionPorperty(missionId);
			mission_left->missionShow(missionId);
			--missionId;
		}
		m_mapNormalMission[ci_MapNum-1-idx]=vec_normalMission;
	}

	// 特殊关卡蒙灰;
	m_pMengBan = Sprite :: create(RESOURCE("overlay_map.png"));
	m_pMengBan->setAnchorPoint(Vec2::ZERO);
	m_pMengBan->setPosition(Vec2(GLB_SIZE.width,0));
	m_pMengBan->setOpacity(120);
	cell->addChild(m_pMengBan,Z_Second);
	// 设置混合模式;
	BlendFunc cbl = {GL_DST_COLOR,GL_ONE_MINUS_SRC_ALPHA};
	m_pMengBan->setBlendFunc(cbl);

	auto pFog = Sprite::create(RESOURCE("wuqi_ddt.png"));
	pFog->setAnchorPoint(Vec2::ZERO);
	pFog->setPosition(Vec2(GLB_SIZE.width,0));
	cell->addChild(pFog,Z_Third);

	//布置特殊关卡;
//.........这里部分代码省略.........
开发者ID:SIM0NL1,项目名称:Classes,代码行数:101,代码来源:OverTableView.cpp

示例14: tableCellAtIndex

TableViewCell* FriendListScene::tableCellAtIndex(TableView *table, ssize_t idx)
{
    int index = idx;
    EziFacebookFriend* myFriend = (EziFacebookFriend*)_friendList.at(index);
    std::string friendName = myFriend->getName();
    //const char* photoPath = myFriend->getPhotoPath().c_str();
    bool toRequestForPhoto = false;
    
    if (myFriend->getPhoto() == nullptr)
    {
        toRequestForPhoto = true;
        //EziSocialObject::sharedObject()->getProfilePicForID(this, myFriend->getFBID(), SCALED_VALUE(85.0f), SCALED_VALUE(85.0f), false);
    }
    
    // Build the table cell.
    TableViewCell *cell = table->cellAtIndex(idx);
    
    if (cell == NULL)
    {
        cell = new TableViewCell();
        cell->autorelease();
        
        LayerColor* colorLayer = LayerColor::create(Color4B(100, 100, 100, 200),
                                                        AppDelegate::SCREEN_WIDTH - SCALED_VALUE(20.0f),
                                                        SCALED_VALUE(124.0f));
        //cell->addChild(colorLayer);
        
        LayerColor* photoLayer = LayerColor::create(Color4B(255, 255, 255, 255),
                                                        SCALED_VALUE(100.0f),
                                                        SCALED_VALUE(100.0f));
        photoLayer->setPosition(SCALED_VALUE(40.0f), SCALED_VALUE(12.0f));
        cell->addChild(photoLayer);
        Sprite* userPhotoSprite = NULL;
        
        if (toRequestForPhoto)
        {
            userPhotoSprite = Sprite::create();
            userPhotoSprite->setContentSize(Size(SCALED_VALUE(85.0f), SCALED_VALUE(85.0f)));
        }
        else
        {
            userPhotoSprite = myFriend->getPhoto(CC_CALLBACK_2(FriendListScene::applyPhoto, this),
                                                 false,
                                                 SCALED_VALUE(85.0f),
                                                 SCALED_VALUE(85.0f));
            
            if (userPhotoSprite == nullptr) { userPhotoSprite = Sprite::create(); }
        }
        
        cell->addChild(userPhotoSprite);
        userPhotoSprite->setAnchorPoint(Point(0.0f, 0.0));
        userPhotoSprite->cocos2d::CCNode::setPosition(SCALED_VALUE(47.0f), SCALED_VALUE(18.0f));
        userPhotoSprite->setTag(TAG_PHOTO);
        
        auto message = LabelTTF::create(friendName.c_str(), "Arial", SCALED_VALUE(30.0f));
        message->setAnchorPoint(Point(0, 0.5));
        message->setPosition(Point(photoLayer->getContentSize().width + photoLayer->getPositionX() + SCALED_VALUE(20.0f),
                                 colorLayer->getContentSize().height/2));
        cell->addChild(message);
        message->setTag(TAG_MESSAGE);
        
        
        /*
        Sprite* consumedIcon = Sprite::createWithSpriteFrameName("green_tick");
        consumedIcon->setAnchorPoint(Point(1.0, 0.5));
        cell->addChild(consumedIcon);
        consumedIcon->setPosition(Point(colorLayer->getContentSize().width - SCALED_VALUE(20.0f),
                                      colorLayer->getContentSize().height/2));
        message->setTag(TAG_CONSUMED_ICON);
        
        MenuItemImage* useButton = MenuItemImage::create();
        useButton->setSelectedSpriteFrame(SpriteFrameCache::getInstance()->getSpriteFrameByName("btn_use_prd"));
        useButton->setNormalSpriteFrame(SpriteFrameCache::getInstance()->getSpriteFrameByName("btn_use_nrl"));
        useButton->setAnchorPoint(Point(1.0, 0.5));
        useButton->setTarget(this, menu_selector(FriendListScene::useRequest));
        
        Menu* useMenu = Menu::create(useButton, NULL);
        cell->addChild(useMenu);
        useMenu->setPosition(Point(colorLayer->getContentSize().width - SCALED_VALUE(20.0f),
                                 colorLayer->getContentSize().height/2));
        
        useButton->setTag(index);
        useMenu->setTag(TAG_USE_MENU);
        */
        
    }
    else
    {
        Sprite* cellProfilePic = (Sprite*)cell->getChildByTag(TAG_PHOTO);
        
        if (toRequestForPhoto == false)
        {
            //cellProfilePic->setTexture(Sprite::create(myFriend->getPhotoPath())->getTexture());
            Sprite* tempSprite = myFriend->getPhoto();
            
            
            if (myFriend->getPhoto() != nullptr)
            {
                cellProfilePic->setTexture(tempSprite->getTexture());
            }
//.........这里部分代码省略.........
开发者ID:ezibyte,项目名称:EziSocialDemo-Cocos2dx-3x,代码行数:101,代码来源:FriendListScene.cpp


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